// 文档 https://github.com/hooke007/MPV_lazy/wiki/4_GLSL

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!WIDTH LUMA.w 3 *
//!HEIGHT LUMA.h 3 *
//!COMPONENTS 1
//!BIND LUMA
//!SAVE LANCZOS3
//!DESC [AiUpscale_Fast_3x_Photo_RT] lanczos3

#define FIX(c)		max(abs(c), 1e-5)
#define PI		3.141592653

vec3 weight3(float x)
{
    vec3 s = FIX(2.0 * PI * vec3(x - 1.5, x - 0.5, x + 0.5));
    return sin(s) * sin(s / 3.0) / (s * s);
}

float line_run(float ypos, vec3 xpos1, vec3 xpos2, vec3 linetaps1, vec3 linetaps2)
{
    return float(LUMA_tex(vec2(xpos1.r, ypos))) * linetaps1.r + float(LUMA_tex(vec2(xpos1.g, ypos))) * linetaps2.r + float(LUMA_tex(vec2(xpos1.b, ypos))) * linetaps1.g + float(LUMA_tex(vec2(xpos2.r, ypos))) * linetaps2.g + float(LUMA_tex(vec2(xpos2.g, ypos))) * linetaps1.b + float(LUMA_tex(vec2(xpos2.b, ypos))) * linetaps2.b;
}

vec4 hook()
{
    vec2 pos = LUMA_pos + LUMA_pt * 0.5;
    vec2 f = fract(pos / LUMA_pt);

    vec3 linetaps1 = weight3(0.5 - f.x * 0.5);
    vec3 linetaps2 = weight3(1.0 - f.x * 0.5);
    vec3 columntaps1 = weight3(0.5 - f.y * 0.5);
    vec3 columntaps2 = weight3(1.0 - f.y * 0.5);

    float suml = dot(linetaps1, vec3(1.0)) + dot(linetaps2, vec3(1.0));
    float sumc = dot(columntaps1, vec3(1.0)) + dot(columntaps2, vec3(1.0));
    linetaps1 /= suml;
    linetaps2 /= suml;
    columntaps1 /= sumc;
    columntaps2 /= sumc;

    vec2 xystart = (-2.5 - f) * LUMA_pt + pos;
    vec3 xpos1 = vec3(xystart.x, xystart.x + LUMA_pt.x, xystart.x + LUMA_pt.x * 2.0);
    vec3 xpos2 = vec3(xystart.x + LUMA_pt.x * 3.0, xystart.x + LUMA_pt.x * 4.0, xystart.x + LUMA_pt.x * 5.0);

    return vec4(line_run(xystart.y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.r + line_run(xystart.y + LUMA_pt.y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.r + line_run(xystart.y + LUMA_pt.y * 2.0 , xpos1, xpos2, linetaps1, linetaps2) * columntaps1.g + line_run(xystart.y + LUMA_pt.y * 3.0 , xpos1, xpos2, linetaps1, linetaps2) * columntaps2.g + line_run(xystart.y + LUMA_pt.y * 4.0 , xpos1, xpos2, linetaps1, linetaps2) * columntaps1.b + line_run(xystart.y + LUMA_pt.y * 5.0 , xpos1, xpos2, linetaps1, linetaps2) * columntaps2.b, 0, 0, 0);
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND LUMA
//!SAVE FEATURE1
//!DESC [AiUpscale_Fast_3x_Photo_RT] feature map 1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.059582080692053,0.042667746543884,0.036412753164768,0.033615559339523);
res += vec4(-0.014980522915721,0.038852114230394,-0.065910898149014,-0.012807548046112) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(-0.252943187952042,0.246745780110359,-0.038940627127886,0.012005069293082) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(0.094578869640827,0.106092698872089,0.082027301192284,0.034119382500648) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(-0.074634335935116,-0.003580203279853,0.004574680235237,0.002507919445634) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(0.115862525999546,-0.100404843688011,0.037632554769516,-0.020058237016201) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(-0.070157200098038,-0.003859289456159,0.051483407616615,-0.031109753996134) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(0.114839315414429,-0.065814532339573,-0.060848623514175,-0.020636679604650) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(0.126572802662849,-0.382310360670090,0.134197205305099,0.645493328571320) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(0.064705967903137,0.032603189349174,-0.171806186437607,0.034497261047363) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(-0.046879198402166,-0.069306291639805,-0.021835884079337,0.054398417472839) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(-0.132233709096909,-0.055377125740051,0.099818632006645,-0.039442472159863) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(-0.108920797705650,-0.427122920751572,-0.565045118331909,-0.494132131338120) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(0.636122167110443,0.879086613655090,0.621504485607147,0.422808170318604) * float(LUMA_texOff(vec2(0,0)));
res += vec4(0.010076158680022,-0.101127766072750,0.145368576049805,-0.045060385018587) * float(LUMA_texOff(vec2(0,1)));
res += vec4(0.069005236029625,0.104266881942749,-0.025355732068419,-0.065223962068558) * float(LUMA_texOff(vec2(0,2)));
res += vec4(0.200469180941582,0.076503857970238,-0.089310385286808,0.039738718420267) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(-0.014233837835491,0.275360345840454,-0.342325150966644,-0.483184427022934) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.404905676841736,-0.781003832817078,0.069363087415695,-0.518562734127045) * float(LUMA_texOff(vec2(1,0)));
res += vec4(0.090917155146599,-0.023794246837497,0.156301811337471,-0.009428147226572) * float(LUMA_texOff(vec2(1,1)));
res += vec4(-0.112989500164986,-0.027433365583420,0.012146528810263,0.022429371252656) * float(LUMA_texOff(vec2(1,2)));
res += vec4(-0.065211698412895,-0.021230641752481,0.040334343910217,0.035255238413811) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(0.124213032424450,-0.153105944395065,0.037506785243750,-0.110949367284775) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.261746048927307,0.333824217319489,-0.015039266087115,0.200453534722328) * float(LUMA_texOff(vec2(2,0)));
res += vec4(-0.047682996839285,0.078264541924000,-0.082837894558907,-0.081798352301121) * float(LUMA_texOff(vec2(2,1)));
res += vec4(-0.077173590660095,0.055805623531342,0.012631924822927,0.017717124894261) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.801051557064056,0.740393400192261,0.128884404897690,0.028003238141537) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.078826270997524,0.205852672457695,-0.069980442523956,0.070182226598263);
res += vec4(0.014703003689647,-0.020045192912221,0.010028300806880,-0.057250510901213) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(0.061914142221212,0.051051698625088,-0.033520534634590,0.084715835750103) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(-0.026172170415521,-0.057838000357151,0.210970476269722,-0.249496370553970) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(-0.049913797527552,0.060377441346645,-0.170756727457047,-0.034216430038214) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(0.033369276672602,-0.011299653910100,0.060946084558964,-1.358767509460449) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(-0.016712188720703,0.107138030230999,-0.025707777589560,0.042311593890190) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(0.093354590237141,-0.176302313804626,-0.070424631237984,0.000079421282862) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(0.245972245931625,0.288502842187881,-0.144437029957771,0.025268182158470) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(0.379891663789749,-0.064669102430344,0.244317531585693,0.588843584060669) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(0.038987405598164,-0.016125433146954,0.018929814919829,-0.158712789416313) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(0.018147582188249,-0.078824900090694,0.186171665787697,-0.022860856726766) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(0.051103115081787,-1.499629020690918,-0.169106602668762,0.088400423526764) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(-0.469199657440186,-0.020128387957811,0.988143682479858,-0.083630070090294) * float(LUMA_texOff(vec2(0,0)));
res += vec4(-0.327107131481171,0.087347194552422,-0.714859783649445,0.073713272809982) * float(LUMA_texOff(vec2(0,1)));
res += vec4(-0.160719990730286,0.053285628557205,0.116846039891243,-0.164523884654045) * float(LUMA_texOff(vec2(0,2)));
res += vec4(-0.026558790355921,0.048389110714197,-0.087366230785847,-0.029930928722024) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(0.263861447572708,-0.181032776832581,0.244036063551903,-0.015319542959332) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.219350621104240,0.206729769706726,-0.660510957241058,-0.002719580195844) * float(LUMA_texOff(vec2(1,0)));
res += vec4(-0.029776366427541,-0.010349479503930,0.083873771131039,-0.102092437446117) * float(LUMA_texOff(vec2(1,1)));
res += vec4(0.095343746244907,0.032070156186819,-0.043585084378719,-0.005807059351355) * float(LUMA_texOff(vec2(1,2)));
res += vec4(0.036029912531376,-0.024214580655098,-0.047539733350277,-0.003341448958963) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(0.037262842059135,0.082217127084732,-0.019213192164898,-0.001085798838176) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.104088604450226,0.033784147351980,0.193867638707161,-0.023225182667375) * float(LUMA_texOff(vec2(2,0)));
res += vec4(0.014310213737190,-0.012378872372210,-0.038635630160570,0.071421697735786) * float(LUMA_texOff(vec2(2,1)));
res += vec4(-0.015386707149446,-0.011859565973282,-0.066702410578728,-0.033227067440748) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(-0.062005188316107,-0.020599853247404,1.239066720008850,0.024003416299820) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND LUMA
//!SAVE FEATURE2
//!DESC [AiUpscale_Fast_3x_Photo_RT] feature map 2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.647198379039764,0.100394897162914,-0.122859358787537,-0.434192419052124);
res += vec4(0.027042625471950,0.023700624704361,0.013473643921316,0.022460529580712) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(-0.077330850064754,0.062222070991993,-0.045601323246956,0.005183764267713) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(0.029047384858131,0.039884153753519,0.211751401424408,0.140344038605690) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(0.075753264129162,-0.075714431703091,0.093683801591396,-0.054926790297031) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(-0.033031634986401,0.012280435301363,-0.016862526535988,0.034563645720482) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(-0.004250792320818,0.036112882196903,0.152881011366844,-0.007612986024469) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(0.021789880469441,0.129954993724823,-0.044431962072849,-0.005827539600432) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(0.368482530117035,0.392964750528336,0.144683927297592,0.117393597960472) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(-0.064521394670010,0.147528007626534,0.213449165225029,0.160465165972710) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(0.006756459362805,0.042015865445137,0.134596735239029,-0.002204393036664) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(-0.037485290318727,-0.017036998644471,0.033341605216265,0.072441354393959) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(0.492011845111847,0.291334390640259,-0.336362510919571,0.014746351167560) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(0.696705758571625,-0.617730975151062,0.054072033613920,0.227839514613152) * float(LUMA_texOff(vec2(0,0)));
res += vec4(-0.257849454879761,-0.250150799751282,-0.226572990417480,0.133922025561333) * float(LUMA_texOff(vec2(0,1)));
res += vec4(0.042142506688833,-0.133865609765053,0.168436229228973,0.036560792475939) * float(LUMA_texOff(vec2(0,2)));
res += vec4(0.012951349839568,0.009238064289093,-0.087442271411419,-0.019949387758970) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(-0.259303897619247,0.314826667308807,0.006733325775713,0.119741842150688) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.078351356089115,-0.508621513843536,-0.177219584584236,0.149652123451233) * float(LUMA_texOff(vec2(1,0)));
res += vec4(-0.010443639941514,0.055521562695503,0.285551190376282,0.327297538518906) * float(LUMA_texOff(vec2(1,1)));
res += vec4(-0.016210868954659,0.018001044169068,-0.000429855834227,-0.072477720677853) * float(LUMA_texOff(vec2(1,2)));
res += vec4(-0.018080048263073,-0.016830664128065,0.011442963965237,-0.050851434469223) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(-0.051533527672291,0.008571458980441,-0.036097861826420,0.025500992313027) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.013822582550347,-0.076763726770878,-0.193530648946762,0.039591580629349) * float(LUMA_texOff(vec2(2,0)));
res += vec4(0.058407608419657,-0.027503762394190,-0.080115713179111,0.026155300438404) * float(LUMA_texOff(vec2(2,1)));
res += vec4(-0.007642820477486,0.057579346001148,-0.088462956249714,-0.011249391362071) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.043756436556578,0.495293408632278,0.827328741550446,1.057148337364197) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.192059099674225,-0.170409366488457,-0.369170993566513,-0.466949552297592);
res += vec4(0.132213816046715,-0.013647073879838,0.014990745112300,0.014243457466364) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(0.028581388294697,-0.006426907144487,-0.074123233556747,-0.024842869490385) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(0.159116521477699,-0.038973070681095,0.137251451611519,0.066141501069069) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(-0.025190440937877,-0.015825144946575,-0.094173662364483,-0.020728584378958) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(-0.037357885390520,-0.027009868994355,-0.005858574062586,0.029279906302691) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(-0.087725713849068,-0.127457544207573,0.004066003486514,-0.022967344149947) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(-0.368060290813446,0.064460307359695,-0.041351169347763,0.130898013710976) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(-0.354893416166306,-0.168959528207779,-0.306687474250793,-0.253186196088791) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(0.049509860575199,0.098750561475754,0.085980534553528,0.260443300008774) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(0.154577285051346,0.074290968477726,-0.190836206078529,-0.015240950509906) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(-0.061476521193981,0.312641739845276,-0.044658541679382,0.057267818599939) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(0.654076755046844,-0.611877381801605,0.302966773509979,0.008538696914911) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(-0.567325472831726,0.335767567157745,0.967058539390564,0.090281493961811) * float(LUMA_texOff(vec2(0,0)));
res += vec4(0.124823756515980,-0.173361867666245,-0.272865235805511,0.742723047733307) * float(LUMA_texOff(vec2(0,1)));
res += vec4(-0.120334498584270,0.191191852092743,0.065951123833656,-0.096296921372414) * float(LUMA_texOff(vec2(0,2)));
res += vec4(-0.129894435405731,-0.053407322615385,-0.052412591874599,-0.038007058203220) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(-0.025507295504212,-0.033320456743240,0.034285679459572,-0.002738202456385) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.047586932778358,0.490713387727737,0.042999707162380,-0.007701861672103) * float(LUMA_texOff(vec2(1,0)));
res += vec4(0.082333065569401,0.130985647439957,0.035748329013586,-0.280122667551041) * float(LUMA_texOff(vec2(1,1)));
res += vec4(0.048115104436874,-0.159160733222961,-0.122651219367981,0.093150705099106) * float(LUMA_texOff(vec2(1,2)));
res += vec4(0.014071687124670,-0.060335237532854,-0.016470912843943,-0.015687186270952) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(0.069456301629543,0.076212763786316,-0.107117906212807,-0.012298390269279) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(0.010022756643593,0.021233657374978,0.236492604017258,0.014172104187310) * float(LUMA_texOff(vec2(2,0)));
res += vec4(-0.045799639075994,-0.083337448537350,-0.136544302105904,0.050590611994267) * float(LUMA_texOff(vec2(2,1)));
res += vec4(-0.042949292808771,0.073125362396240,0.051909435540438,-0.011363819241524) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.980549275875092,0.914440691471100,0.687309861183167,-0.092687755823135) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND LUMA
//!SAVE FEATURE3
//!DESC [AiUpscale_Fast_3x_Photo_RT] feature map 3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.289756178855896,-0.071761056780815,0.201782271265984,-0.392797708511353);
res += vec4(0.015779314562678,0.045997232198715,-0.038982793688774,-0.000313383527100) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(-0.009354916401207,-0.125481560826302,-0.000068369874498,-0.014934279024601) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(0.100382812321186,-0.038192734122276,-0.106564819812775,-0.136100232601166) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(-0.036689441651106,-0.058467704802752,0.041352104395628,0.092707425355911) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(-0.041079696267843,0.055362734943628,0.043844506144524,0.018819272518158) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(-0.056050885468721,0.001022049691528,0.152613461017609,-0.024561583995819) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(0.234214857220650,-0.307311356067657,-0.247502431273460,-0.112970873713493) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(-0.229863077402115,-0.261409848928452,-1.530366897583008,0.232416719198227) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(0.298145353794098,0.015128112398088,0.019563525915146,-0.104532405734062) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(-0.002345771761611,0.029265925288200,0.112908221781254,-0.119183458387852) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(0.138542830944061,0.232680216431618,-0.090146318078041,-0.058601923286915) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(0.061206620186567,0.038938738405704,0.290520250797272,-0.328879117965698) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(1.163543701171875,0.631562829017639,-0.452093482017517,0.868232846260071) * float(LUMA_texOff(vec2(0,0)));
res += vec4(-0.490134865045547,-0.440584421157837,0.384864330291748,0.088674180209637) * float(LUMA_texOff(vec2(0,1)));
res += vec4(0.054943930357695,-0.040018897503614,-0.055529121309519,0.121519245207310) * float(LUMA_texOff(vec2(0,2)));
res += vec4(-0.080831058323383,-0.050127401947975,-0.016331834718585,0.055830515921116) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(-0.079959094524384,0.093750163912773,-0.012385996058583,-0.107102297246456) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(-0.325878322124481,0.302528440952301,0.292883157730103,0.117556825280190) * float(LUMA_texOff(vec2(1,0)));
res += vec4(-0.152280062437057,-0.030702086165547,-0.012994161807001,-0.023583730682731) * float(LUMA_texOff(vec2(1,1)));
res += vec4(0.021083291620016,0.103464990854263,0.000242930676905,-0.051368191838264) * float(LUMA_texOff(vec2(1,2)));
res += vec4(0.008915212936699,-0.078280165791512,-0.006502357311547,-0.079627923667431) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(-0.073049277067184,0.107798278331757,0.020456366240978,0.008306848816574) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.035591877996922,-0.056898914277554,0.007233743555844,0.075941093266010) * float(LUMA_texOff(vec2(2,0)));
res += vec4(-0.138198912143707,0.111717216670513,0.012207547202706,-0.084368124604225) * float(LUMA_texOff(vec2(2,1)));
res += vec4(0.064075939357281,-0.135340884327888,-0.015043459832668,0.060540188103914) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(1.092402100563049,0.813972473144531,0.039641264826059,0.260384172201157) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.370558738708496,0.487255871295929,0.024546649307013,0.157859638333321);
res += vec4(0.005589089356363,0.039680812507868,0.036356296390295,0.021080879494548) * float(LUMA_texOff(vec2(-2,-2)));
res += vec4(-0.042597997933626,-0.038033496588469,-0.162591084837914,0.014636850915849) * float(LUMA_texOff(vec2(-2,-1)));
res += vec4(-0.009858909063041,0.000105202852865,0.184504449367523,0.005537912715226) * float(LUMA_texOff(vec2(-2,0)));
res += vec4(-0.012340035289526,0.008909666910768,0.086481928825378,0.021706176921725) * float(LUMA_texOff(vec2(-2,1)));
res += vec4(-0.003985045477748,-0.002052586991340,0.017765440046787,-0.026543593034148) * float(LUMA_texOff(vec2(-2,2)));
res += vec4(0.009676911868155,-0.014228687621653,-0.098941422998905,-0.016495479270816) * float(LUMA_texOff(vec2(-1,-2)));
res += vec4(-0.170601397752762,0.047566607594490,0.150210916996002,-0.065562129020691) * float(LUMA_texOff(vec2(-1,-1)));
res += vec4(-0.137687772512436,0.004470736719668,0.046738829463720,-0.007670519407839) * float(LUMA_texOff(vec2(-1,0)));
res += vec4(-0.043016970157623,0.222768515348434,-0.266219258308411,0.050623476505280) * float(LUMA_texOff(vec2(-1,1)));
res += vec4(-0.050921868532896,-0.082586660981178,0.022543760016561,-0.013394788838923) * float(LUMA_texOff(vec2(-1,2)));
res += vec4(0.149178385734558,-0.041331779211760,0.153398275375366,0.049074079841375) * float(LUMA_texOff(vec2(0,-2)));
res += vec4(-0.332196891307831,0.152599751949310,-0.347737461328506,-0.559915304183960) * float(LUMA_texOff(vec2(0,-1)));
res += vec4(-0.903772950172424,-0.786475777626038,0.018230222165585,0.367716252803802) * float(LUMA_texOff(vec2(0,0)));
res += vec4(-0.317804634571075,-0.303722232580185,0.470279514789581,0.121398761868477) * float(LUMA_texOff(vec2(0,1)));
res += vec4(-0.066087819635868,0.131848856806755,0.102249450981617,-0.054320011287928) * float(LUMA_texOff(vec2(0,2)));
res += vec4(0.035613730549812,-0.010947093367577,0.048415198922157,-0.238632827997208) * float(LUMA_texOff(vec2(1,-2)));
res += vec4(0.016891481354833,0.083584666252136,0.169994339346886,-0.641410350799561) * float(LUMA_texOff(vec2(1,-1)));
res += vec4(0.341871023178101,-0.099658392369747,-0.537310183048248,-0.379203468561172) * float(LUMA_texOff(vec2(1,0)));
res += vec4(-0.051566015928984,-0.008878734894097,0.027129959315062,-0.142588704824448) * float(LUMA_texOff(vec2(1,1)));
res += vec4(0.034722931683064,0.020104497671127,-0.215154036879539,0.033687934279442) * float(LUMA_texOff(vec2(1,2)));
res += vec4(0.011069183237851,0.025066083297133,-0.164841279387474,-0.024233961477876) * float(LUMA_texOff(vec2(2,-2)));
res += vec4(-0.048584207892418,-0.076683185994625,0.112781710922718,-0.112371787428856) * float(LUMA_texOff(vec2(2,-1)));
res += vec4(-0.051319163292646,0.015526830218732,0.051174204796553,0.069044910371304) * float(LUMA_texOff(vec2(2,0)));
res += vec4(-0.020689962431788,0.102409936487675,0.047008730471134,-0.036150280386209) * float(LUMA_texOff(vec2(2,1)));
res += vec4(0.019754271954298,-0.054251007735729,0.050271350890398,0.038027767091990) * float(LUMA_texOff(vec2(2,2)));
res = max(res, vec4(0.0)) + vec4(0.467043101787567,-0.732258677482605,0.772117853164673,0.147182643413544) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND FEATURE1
//!BIND FEATURE2
//!BIND FEATURE3
//!SAVE MODEL1
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 1_1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.048944715410471,-0.086265221238136,-0.540110111236572,0.262778341770172);
res += mat4(0.182208031415939,-0.075839348137379,0.184105306863785,0.056745208799839,-0.139747560024261,-0.025489291176200,0.153915733098984,0.028004776686430,-0.000188886246178,-0.227980986237526,-0.062279060482979,0.174112796783447,-0.157893046736717,0.000092537899036,0.053790707141161,0.058614384382963) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(0.110108949244022,0.152316942811012,-0.140025272965431,0.357211589813232,0.160480424761772,0.163965135812759,-0.468463420867920,0.439550518989563,0.083099946379662,0.122949689626694,-0.037885308265686,-0.105617880821228,-0.136364236474037,-0.089775420725346,-0.092274993658066,0.180605039000511) * FEATURE1_texOff(vec2(-1,0));
res += mat4(0.170339107513428,0.084719926118851,0.029853714630008,0.039004925638437,0.115030519664288,0.032182604074478,0.272694647312164,0.147160261869431,-0.286656200885773,-0.089152313768864,-0.028946045786142,0.105100281536579,0.058083776384592,0.337018877267838,0.107260480523109,0.205660551786423) * FEATURE1_texOff(vec2(-1,1));
res += mat4(0.096052289009094,0.027108551934361,-0.094145104289055,0.002214319072664,0.304600834846497,-0.300867199897766,-0.001229188404977,-0.039372280240059,0.184712320566177,0.045806258916855,0.201813414692879,-0.169016495347023,-0.060682598501444,-0.107161670923233,0.024578647688031,-0.080364868044853) * FEATURE1_texOff(vec2(0,-1));
res += mat4(0.083060964941978,0.028850084170699,0.296194553375244,-0.231681838631630,0.073264896869659,0.016885763034225,0.538462102413177,-0.664029717445374,-0.329097002744675,0.295961111783981,0.259252578020096,-0.052961017936468,-0.074360348284245,-0.075524993240833,-0.200732752680779,0.082993626594543) * FEATURE1_texOff(vec2(0,0));
res += mat4(-0.066834174096584,0.178240716457367,-0.287423342466354,0.179745957255363,-0.402948647737503,-0.100919760763645,-0.258558362722397,0.092516973614693,0.063658714294434,0.171955034136772,-0.398582905530930,0.109695605933666,-0.079811133444309,0.158109992742538,-0.029468167573214,0.015056731179357) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.054937068372965,-0.102849446237087,0.027088114991784,0.026118295267224,-0.137273237109184,0.289814084768295,0.163034245371819,-0.002861104439944,-0.195128738880157,0.050235476344824,-0.132903382182121,-0.153368502855301,-0.006060748361051,0.007636116351932,0.061912927776575,-0.031826119869947) * FEATURE1_texOff(vec2(1,-1));
res += mat4(-0.100595243275166,-0.115600787103176,0.005820587277412,0.018502548336983,-0.201098173856735,-0.205191940069199,-0.141175404191017,0.125872671604156,-0.230601206421852,-0.102297671139240,-0.030232682824135,-0.158706501126289,-0.077021665871143,-0.061293065547943,0.031948197633028,-0.213531792163849) * FEATURE1_texOff(vec2(1,0));
res += mat4(-0.268125176429749,-0.068770356476307,0.091344885528088,-0.122622095048428,0.010101565159857,-0.048592716455460,-0.033864792436361,0.183925375342369,0.128866091370583,-0.225970551371574,0.053967788815498,0.009074314497411,0.193590819835663,0.124753497540951,-0.183776527643204,0.053823247551918) * FEATURE1_texOff(vec2(1,1));
res += mat4(-0.013013297691941,-0.186047449707985,-0.282776117324829,0.038010712713003,-0.274605154991150,-0.044265918433666,0.096243776381016,-0.080039031803608,-0.056596230715513,-0.035760983824730,0.214426100254059,-0.050751045346260,0.287065386772156,0.032126143574715,0.212296515703201,-0.119178764522076) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(-0.253796368837357,0.184211477637291,-0.350035548210144,0.292141854763031,0.092921346426010,0.134689643979073,-0.234721764922142,-0.116123631596565,0.015589127317071,-0.058932535350323,0.067479625344276,0.060844011604786,-0.131589964032173,-0.197056084871292,-0.126783713698387,-0.054319392889738) * FEATURE2_texOff(vec2(-1,0));
res += mat4(-0.026637805625796,-0.079083248972893,-0.622362256050110,0.135605722665787,0.176363751292229,0.137905970215797,0.209001734852791,-0.030197825282812,-0.175999969244003,-0.109106466174126,-0.091823264956474,-0.024180170148611,0.059541158378124,0.268265277147293,0.054961066693068,-0.139003589749336) * FEATURE2_texOff(vec2(-1,1));
res += mat4(-0.206577926874161,-0.074362844228745,-0.249191477894783,0.065543629229069,-0.084605984389782,-0.163714662194252,-0.042223844677210,0.066994607448578,-0.071305327117443,0.208453506231308,-0.372290104627609,0.076643742620945,0.156192123889923,-0.127186059951782,0.136012375354767,-0.110954850912094) * FEATURE2_texOff(vec2(0,-1));
res += mat4(0.332526922225952,0.160266712307930,0.567414999008179,0.106855116784573,-0.001951861311682,0.207047536969185,-0.401141405105591,0.538086593151093,-0.058877728879452,0.161113172769547,0.160697638988495,-0.010847859084606,-0.251469522714615,0.245207682251930,0.353202819824219,0.047236971557140) * FEATURE2_texOff(vec2(0,0));
res += mat4(-0.356415361166000,0.242526680231094,0.462251216173172,-0.160156741738319,0.091252557933331,-0.025108605623245,-0.033185400068760,-0.388375997543335,0.006352663040161,-0.229300260543823,-0.192266747355461,0.033792406320572,-0.000860660802573,0.087750859558582,0.232587292790413,0.174809485673904) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.293112158775330,-0.061114888638258,-0.214689061045647,-0.035091962665319,0.190778285264969,0.064689576625824,0.071766130626202,-0.053888045251369,0.442450284957886,0.051539186388254,0.034349601715803,0.136215731501579,0.094282597303391,-0.041154231876135,0.088800124824047,-0.030827121809125) * FEATURE2_texOff(vec2(1,-1));
res += mat4(0.074209064245224,0.057365048676729,0.252299785614014,-0.053217701613903,0.024218469858170,-0.156898736953735,-0.054812725633383,-0.007610615342855,0.096308097243309,0.079941168427467,-0.015466831624508,-0.118595801293850,0.026357453316450,-0.067593276500702,0.231849461793900,-0.189952462911606) * FEATURE2_texOff(vec2(1,0));
res += mat4(0.065877988934517,-0.142353817820549,-0.024111643433571,-0.141709238290787,-0.151925325393677,-0.185611262917519,-0.029303614050150,-0.104543440043926,-0.092035271227360,0.120603956282139,-0.005746845621616,0.147071510553360,-0.048295222222805,0.055521730333567,-0.161409586668015,0.070596806704998) * FEATURE2_texOff(vec2(1,1));
res += mat4(-0.175647750496864,-0.188330605626106,-0.087956681847572,0.364898830652237,-0.132306233048439,0.015016093850136,-0.077282473444939,-0.040247730910778,-0.161576837301254,0.163247555494308,0.148530766367912,-0.090248569846153,0.208406776189804,-0.049230985343456,-0.061715032905340,0.079258710145950) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(0.016330204904079,-0.244779869914055,0.120800293982029,0.581191420555115,0.280616879463196,0.043310873210430,0.266106635332108,0.025258256122470,0.142605528235435,-0.061398152261972,-0.093513846397400,-0.049328051507473,-0.007151341531426,0.157414451241493,-0.099180035293102,0.120797842741013) * FEATURE3_texOff(vec2(-1,0));
res += mat4(0.036570254713297,-0.028680747374892,-0.131303668022156,0.111238911747932,-0.218915402889252,0.085797652602196,0.122117519378662,-0.005610944703221,-0.053914260119200,-0.119123123586178,0.152575433254242,-0.024242201820016,-0.157584801316261,-0.060414530336857,-0.267706662416458,0.102337017655373) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.309333831071854,-0.468252480030060,-0.168378502130508,0.408208280801773,0.344343066215515,-0.399026602506638,-0.150594636797905,0.190207540988922,0.117240719497204,0.249593526124954,0.024513717740774,-0.169268414378166,0.236514955759048,0.205632224678993,0.123312838375568,0.013889679685235) * FEATURE3_texOff(vec2(0,-1));
res += mat4(0.062072034925222,-0.030984789133072,0.739077389240265,-1.009018063545227,-0.073186360299587,-0.215196818113327,0.298739194869995,-0.362943172454834,0.069797977805138,0.043645434081554,0.095742180943489,-0.166725426912308,-0.033705133944750,-0.011250098235905,0.566655933856964,-0.145894587039948) * FEATURE3_texOff(vec2(0,0));
res += mat4(-0.036758288741112,0.400792956352234,0.164706468582153,0.226491302251816,0.050243325531483,0.183327913284302,0.210787877440453,0.055021785199642,-0.069324500858784,0.448100715875626,0.090948529541492,0.116858355700970,-0.336400359869003,-0.039444115012884,-0.379428982734680,0.536590099334717) * FEATURE3_texOff(vec2(0,1));
res += mat4(-0.052759878337383,0.168344572186470,0.182552412152290,-0.138193413615227,-0.003546976018697,-0.012374859303236,0.067198701202869,0.050319377332926,-0.219525501132011,0.387532860040665,-0.183384791016579,0.071084052324295,-0.202585101127625,0.044595297425985,-0.063385643064976,0.016537267714739) * FEATURE3_texOff(vec2(1,-1));
res += mat4(-0.225397691130638,-0.116259656846523,-0.235302224755287,0.073956087231636,-0.343756616115570,0.144785583019257,-0.241040691733360,0.151656106114388,-0.560626387596130,0.353810459375381,-0.342219650745392,0.072150483727455,-0.359992235898972,-0.156580224633217,-0.061824355274439,-0.060987636446953) * FEATURE3_texOff(vec2(1,0));
res += mat4(0.042387276887894,0.110872074961662,0.024368656799197,0.043487951159477,-0.168938815593719,0.086726933717728,-0.360726684331894,0.027237996459007,0.044515017420053,0.077190496027470,-0.162855625152588,0.069657772779465,0.002754327142611,-0.024020818993449,-0.384171903133392,-0.030362403020263) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.086344324052334,0.737963080406189,0.125573799014091,0.802772402763367) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.236342251300812,-0.062531374394894,0.013856926001608,-0.252082884311676);
res += mat4(0.105273120105267,-0.008587915450335,-0.038268581032753,0.027623398229480,0.001506728469394,-0.122055910527706,-0.130217313766479,-0.168241992592812,0.028097648173571,-0.120551288127899,-0.144707381725311,-0.325316071510315,0.053062941879034,0.086084634065628,0.085026428103447,-0.038215082138777) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(0.094619907438755,0.071933217346668,0.003087280318141,0.062399756163359,-0.194704532623291,-0.427732855081558,-0.084610261023045,0.114634945988655,-0.194342851638794,-0.196917936205864,0.244334757328033,-0.180801093578339,0.111685179173946,-0.169114381074905,-0.027106024324894,-0.032852426171303) * FEATURE1_texOff(vec2(-1,0));
res += mat4(-0.121956653892994,0.038632411509752,-0.059004373848438,-0.140039861202240,-0.429314732551575,-0.197315841913223,0.082289509475231,0.098688170313835,0.376283705234528,-0.032908905297518,-0.126451343297958,0.030122086405754,0.020955625921488,0.007361881434917,0.099474638700485,0.134334221482277) * FEATURE1_texOff(vec2(-1,1));
res += mat4(0.218841522932053,-0.170351222157478,-0.104027837514877,0.042083598673344,-0.267766624689102,-0.257408529520035,0.189402177929878,0.089195586740971,-0.356773793697357,0.004858181346208,0.095212429761887,-0.035064853727818,-0.056408327072859,0.323704421520233,-0.285451084375381,-0.108217224478722) * FEATURE1_texOff(vec2(0,-1));
res += mat4(0.223065435886383,-0.067962959408760,-0.060411881655455,-0.098783515393734,-0.045643165707588,-0.164126589894295,-0.033724285662174,0.193843007087708,0.744074046611786,0.112391449511051,-0.711336553096771,0.402351588010788,-0.070457071065903,-0.250387907028198,-0.084585048258305,0.058876499533653) * FEATURE1_texOff(vec2(0,0));
res += mat4(0.274810612201691,0.130065396428108,-0.294592648744583,-0.094771616160870,-0.453115195035934,0.259176433086395,0.161091178655624,0.045131068676710,-0.176033243536949,-0.138970330357552,0.006618791259825,-0.174416914582253,0.017950894311070,0.081568293273449,-0.142114594578743,-0.240050017833710) * FEATURE1_texOff(vec2(0,1));
res += mat4(0.153319031000137,-0.477970629930496,-0.102968491613865,-0.015247127041221,-0.098678208887577,-0.213473796844482,-0.030149623751640,-0.018299208953977,-0.194282233715057,0.402789920568466,0.189579352736473,0.009935444220901,-0.015542558394372,-0.202667325735092,-0.689617753028870,0.110980778932571) * FEATURE1_texOff(vec2(1,-1));
res += mat4(-0.318712204694748,-0.112795360386372,-0.020743692293763,0.008284064009786,-0.053078349679708,-0.122439123690128,-0.189389526844025,0.030650509521365,-0.000371703092242,-0.591207444667816,0.347104728221893,0.208418980240822,-0.336798042058945,0.161744385957718,0.200320824980736,0.001865127123892) * FEATURE1_texOff(vec2(1,0));
res += mat4(0.220722764730453,0.355188459157944,-0.025435140356421,-0.142058312892914,-0.469049841165543,0.667624175548553,-0.186137244105339,-0.038038127124310,-0.037951856851578,0.254972368478775,-0.013641229830682,-0.029004581272602,0.061366368085146,0.107012487947941,-0.096020348370075,-0.052358604967594) * FEATURE1_texOff(vec2(1,1));
res += mat4(-0.119924105703831,0.026083100587130,-0.234547555446625,-0.098238244652748,0.195245653390884,-0.006717821583152,-0.234737977385521,0.203926846385002,0.222612991929054,0.003690800163895,-0.303304940462112,-0.297365933656693,0.119555667042732,0.037961792200804,-0.236608117818832,-0.104946605861187) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(-0.026424935087562,-0.018059231340885,0.063358761370182,-0.039563328027725,-0.297063767910004,0.096162259578705,0.178749054670334,0.351175248622894,0.119981892406940,-0.034384712576866,0.035283435136080,0.360455572605133,-0.111770115792751,0.194380044937134,-0.171659782528877,-0.152277156710625) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.147384583950043,-0.030753012746572,0.271397083997726,0.416317194700241,-0.126265570521355,-0.004248857032508,-0.020371234044433,-0.268643766641617,0.067351885139942,0.171501681208611,-0.014575986191630,0.010542071424425,-0.006582371890545,0.106883548200130,0.014381369575858,-0.143600255250931) * FEATURE2_texOff(vec2(-1,1));
res += mat4(0.043278057128191,-0.151596024632454,0.016809772700071,-0.157396107912064,-0.047296848148108,-0.207278266549110,0.174995973706245,-0.069312401115894,0.089168280363083,-0.117079555988312,-0.041414894163609,0.257619082927704,-0.111502699553967,-0.780123233795166,-0.397749453783035,0.626779854297638) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.273377299308777,0.258554309606552,-0.157980024814606,-0.228389263153076,0.011371439322829,-0.575522184371948,-0.044256933033466,0.111868262290955,-0.029550151899457,-0.046814192086458,-0.446275115013123,0.589698493480682,0.001521953847259,0.151680961251259,-0.194820150732994,-0.099120847880840) * FEATURE2_texOff(vec2(0,0));
res += mat4(0.329017877578735,-0.152245372533798,-0.221011281013489,0.286839962005615,-0.313295274972916,0.123896799981594,-0.122333474457264,-0.060185741633177,-0.331811875104904,0.010910389013588,0.242420852184296,0.294684827327728,-0.254991590976715,0.114289492368698,0.078370451927185,0.078805536031723) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.034947708249092,0.032664768397808,0.137055575847626,-0.045348908752203,-0.004430353641510,0.082379728555679,-0.050299413502216,0.076341323554516,0.382713526487350,0.022731920704246,-0.222078487277031,-0.358912050724030,-0.102273441851139,-0.100110962986946,-0.202605903148651,0.029809892177582) * FEATURE2_texOff(vec2(1,-1));
res += mat4(-0.196297764778137,0.358192563056946,0.336994409561157,0.018024945631623,0.131485760211945,0.149358212947845,0.346238464117050,-0.224838972091675,-0.084756866097450,-0.582094192504883,0.419350177049637,-0.637102186679840,-0.015968084335327,-0.239760115742683,-0.010702793486416,-0.068512901663780) * FEATURE2_texOff(vec2(1,0));
res += mat4(0.327935010194778,-0.504646062850952,0.301584243774414,-0.342371672391891,0.205065250396729,0.353654563426971,0.020504113286734,-0.030604157596827,0.027352495118976,0.047250539064407,0.014415061101317,-0.147486209869385,-0.040729597210884,0.574805021286011,0.092825539410114,0.019630962982774) * FEATURE2_texOff(vec2(1,1));
res += mat4(0.091021575033665,0.093710400164127,0.222484871745110,-0.038479272276163,0.190650075674057,-0.334921121597290,-0.248740702867508,-0.139120161533356,-0.123936168849468,0.074031837284565,0.042505461722612,-0.084503300487995,0.264204412698746,0.287842690944672,-0.047139592468739,-0.043159600347281) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(0.105714097619057,0.027772469446063,-0.046106968075037,-0.158350095152855,-0.198546409606934,0.091168031096458,-0.147630438208580,0.048695676028728,0.063397370278835,-0.034020461142063,0.325331777334213,-0.190720334649086,0.235589131712914,0.232201382517815,0.608721792697906,-0.130542963743210) * FEATURE3_texOff(vec2(-1,0));
res += mat4(-0.227431222796440,-0.025961343199015,0.091942735016346,-0.119095697999001,0.066829591989517,0.189838767051697,-0.036332394927740,-0.093576155602932,0.272819817066193,-0.034371849149466,-0.111005552113056,0.184323728084564,0.082799702882767,0.146045655012131,0.374612867832184,-0.130525276064873) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.104938901960850,-0.046016559004784,-0.103447437286377,-0.184152618050575,-0.069342821836472,0.201635181903839,-0.191226840019226,0.622268855571747,-0.155739948153496,0.024886939674616,-0.037629503756762,0.168869569897652,0.288096845149994,0.324667036533356,-0.021896796301007,-0.039610415697098) * FEATURE3_texOff(vec2(0,-1));
res += mat4(0.210270285606384,-0.340253442525864,-0.205099523067474,-0.496623635292053,0.214457213878632,-0.210398793220520,0.126109495759010,0.423870682716370,-0.370050102472305,0.468129128217697,0.370938271284103,0.392521083354950,-0.002322079148144,0.426110982894897,0.048189848661423,0.087046399712563) * FEATURE3_texOff(vec2(0,0));
res += mat4(0.580787420272827,-0.095064572989941,-0.356736391782761,-0.096938222646713,0.430735170841217,0.036524109542370,0.123848892748356,-0.012586924247444,0.043274600058794,-0.026329427957535,0.114300735294819,-0.351672768592834,-0.105621583759785,0.586807847023010,-0.092605337500572,-0.078024327754974) * FEATURE3_texOff(vec2(0,1));
res += mat4(0.008911541663110,0.202298507094383,-0.034936171025038,-0.171969085931778,0.053513046354055,0.072592087090015,0.116731017827988,-0.287439167499542,0.096600882709026,-0.115605473518372,0.070843361318111,-0.209468737244606,0.201825097203255,0.037531249225140,-0.145700320601463,0.094604380428791) * FEATURE3_texOff(vec2(1,-1));
res += mat4(0.190439030528069,0.572688102722168,-0.027710394933820,-0.222495555877686,-0.097059667110443,0.043073497712612,0.126690402626991,0.020036332309246,0.209809422492981,-0.149225905537605,-0.047331664711237,0.110301658511162,-0.061055965721607,0.115364767611027,0.020181490108371,0.033986490219831) * FEATURE3_texOff(vec2(1,0));
res += mat4(0.319343596696854,-0.177207618951797,-0.229226723313332,0.099108599126339,0.163479074835777,-0.200690582394600,-0.058819882571697,-0.152826607227325,-0.037996120750904,-0.000568189134356,-0.118794038891792,0.003410268109292,0.067659355700016,0.167736783623695,-0.059552174061537,-0.029005305841565) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.056800708174706,-0.026455227285624,1.024211287498474,0.933988928794861) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND FEATURE1
//!BIND FEATURE2
//!BIND FEATURE3
//!SAVE MODEL2
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 1_2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.131286323070526,-0.125327005982399,0.026187656447291,0.026791343465447);
res += mat4(0.065480835735798,-0.159977108240128,0.014389858581126,0.076263286173344,0.167047187685966,-0.034580886363983,0.082914963364601,-0.008675356395543,-0.028916612267494,0.001013966044411,-0.140649989247322,-0.053149208426476,-0.159565672278404,0.037421837449074,0.035434488207102,0.039077084511518) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(0.032547686249018,0.223770901560783,-0.133849680423737,-0.237678468227386,0.187481135129929,-0.286727458238602,-0.145305752754211,-0.115734674036503,0.046782333403826,0.091475702822208,-0.241767451167107,-0.477639406919479,0.191585928201675,0.192443966865540,0.079861938953400,0.257457673549652) * FEATURE1_texOff(vec2(-1,0));
res += mat4(0.220668464899063,-0.383269727230072,0.146149754524231,-0.072629705071449,-0.175292208790779,-0.113029032945633,-0.001488119247369,-0.393823295831680,-0.004071481525898,0.200768306851387,0.420461416244507,-0.014621046371758,0.038104455918074,0.786936104297638,-0.137965992093086,0.098949335515499) * FEATURE1_texOff(vec2(-1,1));
res += mat4(0.152274727821350,0.204708755016327,0.348751634359360,-0.057322513312101,0.062159217894077,-0.072308242321014,0.223821833729744,0.162338748574257,0.043257642537355,0.136972934007645,-0.011375059373677,0.099939621984959,0.009103712625802,0.021944668143988,0.016066480427980,0.077334769070148) * FEATURE1_texOff(vec2(0,-1));
res += mat4(-0.326773792505264,0.222370460629463,-0.410705387592316,-0.030493229627609,-0.408671408891678,0.417603224515915,0.062663234770298,0.061385177075863,0.189416468143463,0.051097795367241,-0.389133512973785,0.119145274162292,-0.498833984136581,-0.098969466984272,0.098602473735809,0.447136789560318) * FEATURE1_texOff(vec2(0,0));
res += mat4(-0.363995254039764,-0.216978654265404,0.064116358757019,-0.233779862523079,0.200409531593323,-0.196393355727196,0.067886605858803,-0.170448288321495,-0.365819722414017,-0.499185055494308,-0.041049990803003,-0.319449663162231,0.001968283439055,-0.286799371242523,-0.253363519906998,0.205219715833664) * FEATURE1_texOff(vec2(0,1));
res += mat4(0.107093095779419,0.061089180409908,0.087424471974373,0.106149896979332,-0.091565519571304,0.243521198630333,0.388327956199646,-0.064684681594372,0.139329940080643,0.084231726825237,0.201204463839531,-0.090565294027328,0.087552323937416,-0.185062691569328,-0.242295846343040,0.107568807899952) * FEATURE1_texOff(vec2(1,-1));
res += mat4(0.038811407983303,0.127121254801750,-0.050019707530737,0.123469717800617,0.329019069671631,-0.510619163513184,-0.089459948241711,-0.024461869150400,0.162113338708878,-0.063812553882599,0.186240673065186,-0.064850926399231,-0.159788370132446,-0.150974750518799,0.293824881315231,-0.045889031141996) * FEATURE1_texOff(vec2(1,0));
res += mat4(-0.050453882664442,-0.010048230178654,-0.146413862705231,0.122218810021877,0.108353286981583,0.402663975954056,-0.525800704956055,0.272149413824081,-0.117235057055950,0.033488355576992,-0.356244802474976,-0.310533851385117,-0.019176844507456,-0.116200961172581,0.252844125032425,0.134656921029091) * FEATURE1_texOff(vec2(1,1));
res += mat4(0.289024680852890,0.332376837730408,-0.024213649332523,0.057281572371721,-0.015956182032824,0.320062577724457,0.043037161231041,0.077137835323811,-0.112820982933044,0.196076720952988,-0.227269351482391,0.156056880950928,-0.058615233749151,-0.156702309846878,0.012139165773988,0.166081339120865) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(-0.117949925363064,-0.008728887885809,-0.074903726577759,0.018893735483289,0.454958170652390,-0.343215018510818,0.013879066333175,-0.120371922850609,0.095473796129227,-0.086832217872143,0.046945340931416,-0.017018742859364,-0.216464474797249,-0.013364953920245,-0.151051938533783,-0.110686801373959) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.111899510025978,-0.110865801572800,0.136281296610832,0.064596086740494,-0.062039516866207,0.000259572814684,-0.300593346357346,0.301381230354309,-0.043076205998659,-0.068530261516571,0.275180339813232,-0.068769372999668,0.076226033270359,-0.141586408019066,0.120120555162430,0.105550467967987) * FEATURE2_texOff(vec2(-1,1));
res += mat4(0.293880134820938,-0.257824122905731,0.224974438548088,-0.031090006232262,-0.051654223352671,-0.072410903871059,-0.077902719378471,0.194506570696831,-0.071294657886028,-0.131805554032326,-0.058272354304790,-0.121590532362461,-0.035428181290627,-0.009344661608338,0.120711378753185,0.094478413462639) * FEATURE2_texOff(vec2(0,-1));
res += mat4(0.036745846271515,-0.400674819946289,-0.088485784828663,0.139565542340279,-0.014686482027173,-0.327950149774551,0.376461625099182,0.058773104101419,0.037629306316376,0.174690380692482,-0.079118639230728,0.045022323727608,-0.325825840234756,0.151652365922928,0.071076624095440,0.278160810470581) * FEATURE2_texOff(vec2(0,0));
res += mat4(0.039079032838345,-0.580524325370789,-0.171986937522888,-0.011464978568256,0.030383100733161,0.259026080369949,0.404352277517319,0.030765116214752,0.067846208810806,-0.033993788063526,-0.108416378498077,-0.006269311066717,-0.077200002968311,-0.088610962033272,-0.080729953944683,-0.210668414831161) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.206065282225609,0.090681567788124,0.202357575297356,-0.170762121677399,-0.017091821879148,0.099957302212715,-0.114986270666122,0.093513920903206,-0.260876655578613,0.009704684838653,0.139157101511955,0.028218818828464,-0.033129401504993,-0.081193692982197,-0.092832721769810,0.032482661306858) * FEATURE2_texOff(vec2(1,-1));
res += mat4(0.091341726481915,0.137890368700027,-0.275237828493118,0.134360760450363,-0.203337639570236,-0.069384805858135,-0.793578863143921,-0.021897217258811,-0.148637562990189,-0.051337402313948,0.032538272440434,-0.020779514685273,0.233148008584976,-0.101072326302528,0.001164470333606,-0.063007876276970) * FEATURE2_texOff(vec2(1,0));
res += mat4(-0.175064027309418,-0.285550832748413,0.084987863898277,-0.029447456821799,0.007665496319532,-0.154943689703941,0.246382474899292,0.027784619480371,0.113454014062881,-0.175558045506477,-0.241464823484421,0.046896614134312,-0.066817857325077,0.023457020521164,-0.058762919157743,-0.055058971047401) * FEATURE2_texOff(vec2(1,1));
res += mat4(0.320933848619461,-0.155941575765610,-0.087715707719326,-0.033810425549746,0.134427100419998,-0.008003498427570,-0.145743355154991,0.190692067146301,0.040744576603174,0.023472297936678,0.010677776299417,0.107243642210960,0.274792820215225,0.030524004250765,-0.163385540246964,0.022125927731395) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(-0.262865036725998,0.397164881229401,0.028714844956994,-0.472633272409439,-0.176503464579582,-0.057923011481762,-0.029789419844747,0.016286086291075,-0.019069798290730,0.058532208204269,-0.091170929372311,0.069206923246384,-0.325253397226334,-0.127976074814796,0.290783882141113,-0.196188479661942) * FEATURE3_texOff(vec2(-1,0));
res += mat4(-0.190807163715363,-0.315867185592651,0.033355791121721,-0.114564947783947,-0.072349175810814,-0.125805363059044,0.118432968854904,-0.239846602082253,-0.002028342802078,0.094553172588348,0.124252535402775,0.109062306582928,0.114054381847382,0.292713105678558,0.060645345598459,0.116595193743706) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.340968251228333,-0.144083052873611,0.136565387248993,-0.169161856174469,0.243452101945877,-0.399431467056274,0.389829128980637,-0.102672941982746,-0.194994240999222,0.020415538921952,-0.003566361032426,0.072995752096176,-0.156947091221809,0.025054961442947,0.189380571246147,0.148555889725685) * FEATURE3_texOff(vec2(0,-1));
res += mat4(-0.362103432416916,0.466564983129501,-0.206339865922928,0.561326444149017,-0.337301880121231,0.263475567102432,-0.048585496842861,0.194517299532890,0.088217183947563,-0.166974127292633,-0.065118893980980,0.240040838718414,-0.331519186496735,-0.379362165927887,-0.227191850543022,-0.066768176853657) * FEATURE3_texOff(vec2(0,0));
res += mat4(-0.272711873054504,-0.147595062851906,-0.105657853186131,-0.284457057714462,-0.213371381163597,-0.169540777802467,-0.363079845905304,0.160113796591759,0.055455271154642,0.293526649475098,-0.086052708327770,-0.077811911702156,-0.194163858890533,-0.200376972556114,0.079362548887730,0.071328975260258) * FEATURE3_texOff(vec2(0,1));
res += mat4(0.027149910107255,0.220967173576355,0.130523219704628,-0.024102635681629,0.256374329328537,0.099676623940468,0.122685112059116,-0.142424866557121,-0.421557366847992,-0.077141754329205,-0.193368867039680,0.250131756067276,0.099762625992298,0.215760305523872,-0.113513991236687,-0.119783967733383) * FEATURE3_texOff(vec2(1,-1));
res += mat4(0.145538344979286,-0.337503105401993,0.244071900844574,-0.266901284456253,0.354231506586075,0.316661328077316,0.116068311035633,-0.183089002966881,0.349456846714020,-0.484279930591583,0.292153567075729,-0.089865453541279,0.051664177328348,-0.377219080924988,0.024507720023394,-0.076057247817516) * FEATURE3_texOff(vec2(1,0));
res += mat4(0.432733774185181,0.194125562906265,-0.060291044414043,0.029046695679426,0.191689208149910,-0.167166307568550,0.086687952280045,-0.005358105525374,0.431691557168961,0.166234791278839,-0.012477485463023,0.051487307995558,0.066857725381851,0.019496258348227,-0.016407581046224,0.079194873571396) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.044237673282623,0.270941197872162,-0.580869674682617,0.462292879819870) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.211036413908005,0.178255885839462,-0.047822728753090,-0.181797608733177);
res += mat4(0.065099567174911,-0.173014402389526,-0.104947820305824,0.006943108513951,-0.101818546652794,0.004476746544242,-0.031977165490389,-0.071746826171875,-0.011443246155977,-0.047701191157103,-0.044785764068365,-0.021601779386401,-0.020215030759573,-0.008179457858205,-0.012186433188617,0.019704487174749) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(-0.026535062119365,0.053828511387110,0.179689601063728,0.013253011740744,0.089769206941128,-0.264174461364746,-0.038931846618652,-0.094261623919010,-0.134045273065567,0.100126087665558,-0.086755745112896,0.027372647076845,0.074237681925297,-0.077181331813335,0.087595410645008,0.146364137530327) * FEATURE1_texOff(vec2(-1,0));
res += mat4(0.033910874277353,-0.079604849219322,-0.188746124505997,0.007505807559937,-0.034583598375320,-0.213953241705894,-0.266014456748962,-0.019069455564022,-0.011974293738604,-0.040381684899330,0.216869503259659,-0.055951591581106,-0.047552812844515,0.044680219143629,-0.009634714573622,-0.092376746237278) * FEATURE1_texOff(vec2(-1,1));
res += mat4(0.026454238221049,-0.017288863658905,-0.049148928374052,0.053892306983471,0.219758898019791,-0.113106690347195,0.135675847530365,-0.237211987376213,0.098274089396000,0.500516355037689,0.089604854583740,0.297288864850998,0.083663903176785,-0.050395313650370,0.057581458240747,0.082129731774330) * FEATURE1_texOff(vec2(0,-1));
res += mat4(0.130791515111923,-0.230189234018326,0.162127390503883,-0.244797542691231,-0.207113489508629,-0.019062353298068,-0.141628131270409,-0.201635569334030,0.509412169456482,-0.607204616069794,-0.275906205177307,-0.216773942112923,0.098520420491695,-0.117402769625187,0.060666669160128,0.093146942555904) * FEATURE1_texOff(vec2(0,0));
res += mat4(-0.123660162091255,-0.147141873836517,0.255335748195648,-0.064106643199921,-0.329069286584854,0.484895884990692,0.397176921367645,-0.068237803876400,-0.231905639171600,0.425026834011078,-0.172118306159973,-0.561533331871033,-0.058037579059601,0.094594001770020,0.074550017714500,-0.053326308727264) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.023954158648849,-0.111204899847507,-0.428020179271698,0.344654113054276,-0.172506541013718,-0.016947256401181,0.061800178140402,-0.114474572241306,0.387017846107483,0.015518728643656,0.029004871845245,0.054295461624861,-0.099276758730412,-0.258729875087738,-0.291697561740875,-0.047861043363810) * FEATURE1_texOff(vec2(1,-1));
res += mat4(0.174144655466080,-0.093445397913456,-0.442252725362778,-0.077629983425140,0.088741235435009,0.027433836832643,0.272724390029907,-0.182521298527718,-0.412370473146439,0.105858623981476,0.316638886928558,-0.025655521079898,-0.095820993185043,-0.221095576882362,0.128213614225388,-0.187235474586487) * FEATURE1_texOff(vec2(1,0));
res += mat4(0.128054872155190,-0.178454414010048,0.046712379902601,0.153123468160629,0.313716024160385,-0.079274103045464,-0.101321399211884,-0.241036146879196,0.101261787116528,0.093318983912468,-0.127649754285812,0.219149529933929,0.160085365176201,0.133349031209946,-0.211221501231194,0.025360003113747) * FEATURE1_texOff(vec2(1,1));
res += mat4(0.043370686471462,0.003974437713623,-0.095297724008560,0.021008078008890,0.068105809390545,-0.031431615352631,-0.116864271461964,0.117026127874851,0.081532813608646,0.196348056197166,0.136191710829735,0.297513961791992,0.224687561392784,-0.026227848604321,-0.017784563824534,0.340598911046982) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(-0.057445004582405,0.043001323938370,-0.091222822666168,-0.032077368348837,-0.113413266837597,0.077744908630848,-0.085825040936470,-0.092787675559521,0.085357010364532,-0.288072288036346,-0.375348150730133,-0.101220145821571,0.021805845201015,0.061617136001587,-0.022129073739052,-0.091066502034664) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.055803772062063,-0.049262475222349,0.145046904683113,-0.080416612327099,-0.047437243163586,-0.102400615811348,-0.046287182718515,-0.080630421638489,0.095763638615608,-0.010605677962303,0.238454565405846,-0.097547627985477,-0.031638339161873,0.023481557145715,-0.057713631540537,0.065032802522182) * FEATURE2_texOff(vec2(-1,1));
res += mat4(-0.084172636270523,-0.270842581987381,-0.089200675487518,-0.266649127006531,0.003062496660277,0.246530085802078,0.431024074554443,0.204969972372055,0.129759788513184,0.373380482196808,0.183528348803520,0.270139664411545,0.012352275662124,0.294577211141586,-0.013847692869604,0.069934375584126) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.043666463345289,0.707548677921295,0.173102781176567,0.143602132797241,-0.411643087863922,-0.477163940668106,0.210736468434334,0.064127713441849,0.097462080419064,-0.230826914310455,-0.253829061985016,-0.041242673993111,0.179142236709595,0.057704217731953,-0.120986208319664,-0.058487419039011) * FEATURE2_texOff(vec2(0,0));
res += mat4(0.071448184549809,-0.644526660442352,0.180512189865112,0.065697543323040,0.155020117759705,0.463277578353882,-0.138088524341583,-0.196123063564301,0.266738682985306,-0.068704351782799,-0.262287378311157,-0.442045718431473,-0.143512547016144,-0.164626151323318,-0.039927180856466,-0.068517550826073) * FEATURE2_texOff(vec2(0,1));
res += mat4(-0.231824681162834,0.032709591090679,-0.185157775878906,0.000980271957815,0.131254911422729,-0.148969888687134,-0.347144603729248,0.036803081631660,0.109825119376183,-0.074800312519073,-0.222787857055664,0.316121190786362,-0.032898761332035,0.065335541963577,-0.066702693700790,0.052051242440939) * FEATURE2_texOff(vec2(1,-1));
res += mat4(0.233691215515137,-0.008579701185226,-0.152351066470146,-0.143403455615044,0.016798008233309,0.162834748625755,0.138051137328148,0.119035325944424,-0.447559118270874,0.016769908368587,0.604256689548492,-0.008025674149394,0.610006868839264,-0.066581629216671,0.089273065328598,-0.276573598384857) * FEATURE2_texOff(vec2(1,0));
res += mat4(-0.347379118204117,0.032727543264627,0.169906198978424,0.237148001790047,0.277125775814056,0.113400511443615,-0.071197979152203,0.239866986870766,-0.328746795654297,-0.235158741474152,0.168428137898445,0.411602973937988,-0.129926338791847,-0.081509843468666,0.059272702783346,-0.098512381315231) * FEATURE2_texOff(vec2(1,1));
res += mat4(0.013579941354692,-0.085210509598255,0.115816637873650,-0.087170369923115,0.113899096846581,0.018920306116343,0.091067239642143,0.068675093352795,-0.008372832089663,0.067968674004078,-0.322261184453964,-0.065517388284206,0.001293169683777,0.015275340527296,-0.176489800214767,0.222558677196503) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(-0.051571685820818,-0.087207868695259,-0.078754134476185,-0.413962125778198,0.072709165513515,-0.009209092706442,-0.084069646894932,0.082680203020573,-0.058366350829601,0.074408292770386,0.145374670624733,0.013841546140611,-0.018161302432418,0.081844985485077,0.021015424281359,0.160157263278961) * FEATURE3_texOff(vec2(-1,0));
res += mat4(-0.160790383815765,0.031492765992880,-0.218555465340614,-0.190821170806885,-0.010800446383655,-0.004536290187389,0.021782716736197,0.035594392567873,-0.099554374814034,-0.223554432392120,0.294347643852234,0.240771934390068,-0.069972746074200,0.506558299064636,0.033406469970942,0.127968028187752) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.003166287206113,0.147238507866859,-0.027892654761672,0.011899366974831,-0.152275010943413,0.337533533573151,-0.175804987549782,0.019283693283796,0.006560608744621,0.046245273202658,0.170045688748360,-0.183900818228722,-0.000779258029070,-0.409343957901001,-0.055008970201015,0.178301215171814) * FEATURE3_texOff(vec2(0,-1));
res += mat4(-0.152243465185165,0.249399900436401,0.452902913093567,0.499021232128143,-0.140259787440300,0.112848632037640,0.277736604213715,0.345147460699081,0.400977700948715,-0.105419196188450,-0.493745356798172,-0.428220599889755,0.145762786269188,-0.465223938226700,-0.232844784855843,-0.191774740815163) * FEATURE3_texOff(vec2(0,0));
res += mat4(-0.188878193497658,-0.240812525153160,0.133133664727211,0.995403110980988,-0.121337659657001,0.097358703613281,-0.154181346297264,0.287328571081161,-0.046041283756495,0.118889398872852,0.406863123178482,0.113678358495235,0.296446025371552,0.505515396595001,-0.081103816628456,-0.151332736015320) * FEATURE3_texOff(vec2(0,1));
res += mat4(0.106178298592567,0.205580547451973,-0.236504450440407,0.268581986427307,0.156313046813011,-0.353333979845047,0.288415849208832,-0.027784334495664,-0.427636414766312,0.018871022388339,0.193111166357994,0.047876648604870,-0.261528611183167,0.014262236654758,-0.093600086867809,0.082533888518810) * FEATURE3_texOff(vec2(1,-1));
res += mat4(0.436508506536484,-0.072161152958870,-0.190090253949165,-0.190120935440063,0.517924427986145,-0.174518078565598,0.143117114901543,-0.001462909742258,0.052306964993477,-0.022425109520555,-0.179101020097733,0.121061570942402,-0.094356954097748,0.076182991266251,-0.039926435798407,-0.029617985710502) * FEATURE3_texOff(vec2(1,0));
res += mat4(0.179745629429817,-0.024461543187499,0.156973659992218,0.002810042817146,-0.108024351298809,-0.041885968297720,-0.093794167041779,-0.046271622180939,0.203769087791443,-0.043205022811890,-0.362906396389008,-0.086333990097046,0.375749051570892,0.013491640798748,-0.307433038949966,-0.288952440023422) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.106304898858070,0.631082713603973,-0.778432071208954,-0.060236372053623) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND FEATURE1
//!BIND FEATURE2
//!BIND FEATURE3
//!SAVE MODEL3
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 1_3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.042253021150827,-0.171874567866325,0.010603309608996,-0.066115953028202);
res += mat4(0.053842369467020,-0.059252433478832,-0.145003810524940,-0.079716697335243,0.112225614488125,-0.113806828856468,-0.174844935536385,-0.205571278929710,0.073396109044552,-0.052799720317125,0.173096030950546,-0.049333672970533,-0.042134352028370,0.031996779143810,-0.063398577272892,0.017862251028419) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(0.497370392084122,0.251693427562714,0.283234864473343,-0.432241797447205,0.323116391897202,0.349409610033035,0.127421274781227,-0.485279113054276,0.300970375537872,0.020958611741662,0.226727649569511,0.076993055641651,0.183171182870865,0.083526223897934,-0.171677127480507,0.038531221449375) * FEATURE1_texOff(vec2(-1,0));
res += mat4(-0.057723741978407,-0.148872420191765,-0.011388474144042,0.107861466705799,-0.285637617111206,0.045634645968676,0.042714089155197,0.324770480394363,0.116726763546467,-0.163443341851234,-0.599296033382416,-0.090851686894894,0.080941878259182,0.182496637105942,0.202036887407303,-0.035009425133467) * FEATURE1_texOff(vec2(-1,1));
res += mat4(0.094634100794792,-0.052404303103685,-0.072158001363277,-0.054394774138927,0.167459875345230,-0.011942996643484,-0.078133851289749,-0.160025283694267,-0.163864210247993,-0.112955830991268,0.292618602514267,-0.058887988328934,0.108335308730602,-0.071129135787487,-0.056766569614410,0.020197739824653) * FEATURE1_texOff(vec2(0,-1));
res += mat4(-0.098944574594498,-0.336908549070358,0.129099592566490,0.117581851780415,-0.459124922752380,-0.598773241043091,0.065352357923985,0.294907718896866,0.003957785200328,-0.379237800836563,0.321592062711716,0.252269923686981,-0.089348375797272,-0.158055409789085,-0.021628834307194,-0.213280454277992) * FEATURE1_texOff(vec2(0,0));
res += mat4(0.223982766270638,0.228326126933098,-0.136573269963264,-0.042573813349009,0.031835507601500,0.220744550228119,-0.362865328788757,0.291790634393692,-0.044120144098997,-0.023439152166247,-0.407377272844315,-0.148055747151375,-0.313022285699844,-0.014446565881371,-0.049148116260767,-0.114756949245930) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.043529141694307,-0.026153907179832,0.105339199304581,-0.259051114320755,0.083581209182739,-0.088633254170418,0.078510232269764,0.331145524978638,-0.063442759215832,0.076029650866985,-0.001938052941114,-0.016993917524815,0.001191781484522,-0.098101057112217,-0.021790694445372,-0.038939006626606) * FEATURE1_texOff(vec2(1,-1));
res += mat4(-0.217785790562630,0.138417750597000,-0.221098005771637,0.251524955034256,0.108201645314693,0.315184265375137,-0.084951378405094,-0.138608917593956,-0.078375920653343,0.029937347397208,-0.175226777791977,0.050962023437023,-0.044628966599703,-0.388420790433884,0.079229153692722,-0.169587627053261) * FEATURE1_texOff(vec2(1,0));
res += mat4(-0.160965889692307,-0.138825163245201,0.010309890843928,0.146903321146965,0.019191388040781,-0.100236006081104,0.163616135716438,-0.173421293497086,-0.029183346778154,0.038163822144270,-0.222233191132545,0.074559092521667,0.026798360049725,-0.116161577403545,-0.006526938173920,0.131571501493454) * FEATURE1_texOff(vec2(1,1));
res += mat4(-0.134566038846970,0.147413641214371,-0.200280874967575,-0.035372756421566,0.137792572379112,-0.103278726339340,-0.073198407888412,0.531257808208466,0.014854148030281,-0.173173069953918,0.077349610626698,0.134168386459351,-0.085830375552177,-0.299928456544876,0.007583419326693,0.114719673991203) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(0.437974244356155,-0.065057203173637,-0.189511924982071,-0.189183622598648,-0.181011572480202,0.073227815330029,-0.001009405241348,-0.270945638418198,-0.128089711070061,0.135502159595490,0.038197252899408,-0.214325219392776,0.016043066978455,-0.172605484724045,0.188455685973167,0.074040524661541) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.028774773702025,-0.460094600915909,0.081462658941746,-0.032628271728754,-0.190794005990028,-0.407354265451431,-0.134452670812607,-0.077335380017757,-0.084107942879200,0.013175515457988,0.037422709167004,0.141960948705673,0.207872956991196,-0.058550313115120,-0.022544601932168,0.088638320565224) * FEATURE2_texOff(vec2(-1,1));
res += mat4(0.003849797649309,-0.107249893248081,-0.333291351795197,-0.307384580373764,-0.025492664426565,0.325869083404541,0.174201175570488,-0.317889750003815,0.129070207476616,0.159129932522774,-0.230502545833588,0.041963834315538,0.034579847007990,-0.370673060417175,0.138567224144936,0.015451911836863) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.028762398287654,-0.011964753270149,0.283712804317474,0.479586780071259,0.446852147579193,0.066716767847538,0.112145334482193,-0.406498730182648,0.019160402938724,-0.073518157005310,0.382947325706482,0.072483189404011,-0.043428793549538,-0.529543220996857,-0.078942485153675,-0.255256503820419) * FEATURE2_texOff(vec2(0,0));
res += mat4(0.294439524412155,-0.182299643754959,0.425146102905273,0.050103567540646,0.040155343711376,0.031622480601072,0.323698550462723,0.103543020784855,0.018512725830078,0.214591100811958,-0.243797644972801,0.107615731656551,-0.116088397800922,-0.141275718808174,-0.121098943054676,0.071728728711605) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.027083378285170,0.205721735954285,-0.017737083137035,0.013773873448372,-0.075957462191582,-0.121187835931778,0.086927071213722,-0.151319384574890,-0.052233181893826,-0.183216616511345,-0.097648076713085,0.156823351979256,-0.037899985909462,0.017710821703076,-0.066512502729893,-0.092012844979763) * FEATURE2_texOff(vec2(1,-1));
res += mat4(-0.175000652670860,-0.122725859284401,0.093279384076595,0.137126937508583,-0.117363236844540,-0.288565069437027,0.065856575965881,0.102658465504646,0.354766130447388,-0.044031437486410,0.168884530663490,-0.373537331819534,0.088249541819096,-0.154791340231895,0.097722537815571,0.082750022411346) * FEATURE2_texOff(vec2(1,0));
res += mat4(-0.159771099686623,-0.023647254332900,-0.150355756282806,0.007458019070327,-0.003329604631290,-0.082967974245548,-0.229451328516006,0.230577215552330,0.060689527541399,0.125917524099350,0.080412946641445,-0.020500225946307,-0.170393913984299,-0.075572498142719,-0.024460902437568,0.059501904994249) * FEATURE2_texOff(vec2(1,1));
res += mat4(-0.004241138231009,0.273615062236786,-0.184191599488258,-0.491643369197845,-0.209693744778633,0.100877933204174,-0.099322237074375,-0.160380259156227,-0.107787452638149,-0.158236369490623,-0.071496650576591,0.092041343450546,0.058762870728970,0.183547809720039,0.311895996332169,0.103403098881245) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(0.546506524085999,0.218195810914040,0.291099667549133,-0.178457826375961,-0.025208294391632,-0.349430322647095,0.185761108994484,0.048761844635010,0.195648565888405,-0.318027138710022,0.142347112298012,-0.007563418708742,0.145183876156807,0.066852204501629,0.199321642518044,-0.332990407943726) * FEATURE3_texOff(vec2(-1,0));
res += mat4(0.378253012895584,0.101372160017490,-0.223982840776443,-0.011523626744747,0.008334067650139,0.054061796516180,-0.021715078502893,0.274802207946777,0.053248893469572,-0.114967606961727,-0.094147570431232,0.030820209532976,0.123640209436417,0.149603083729744,0.046697728335857,0.223892778158188) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.149516344070435,0.226139456033707,0.129655882716179,-0.174862861633301,0.160351186990738,0.463348060846329,-0.195937156677246,-0.415304929018021,0.219468966126442,-0.528262138366699,0.063154637813568,0.209964826703072,-0.214896783232689,-0.072334699332714,-0.088578119874001,-0.097171090543270) * FEATURE3_texOff(vec2(0,-1));
res += mat4(-0.404359430074692,-0.879933178424835,-0.143861398100853,0.279306471347809,-0.241286888718605,-0.302531629800797,0.066790074110031,0.035949770361185,-0.415561378002167,-0.152337864041328,-0.342636853456497,-0.003053124528378,-0.404300868511200,-0.347329020500183,-0.161377131938934,0.246048405766487) * FEATURE3_texOff(vec2(0,0));
res += mat4(-0.455920666456223,0.024683922529221,-0.207589030265808,-0.041167154908180,-0.129825502634048,0.085234038531780,-0.112200848758221,0.033993326127529,-0.321376621723175,-0.072546541690826,0.231334239244461,-0.006100048311055,-0.081959187984467,0.114230483770370,-0.466934412717819,-0.195084378123283) * FEATURE3_texOff(vec2(0,1));
res += mat4(-0.148592412471771,-0.012212838977575,0.016436513513327,0.174970939755440,-0.014589300379157,0.120819501578808,0.014143440872431,0.124617382884026,-0.163632422685623,-0.289684504270554,0.043806582689285,0.210190162062645,0.192842245101929,0.126513630151749,-0.100054651498795,-0.002679269528016) * FEATURE3_texOff(vec2(1,-1));
res += mat4(0.214207738637924,0.285767674446106,0.007386854849756,0.019278701394796,-0.089232705533504,-0.067197360098362,0.069855324923992,-0.030380431562662,0.412117451429367,0.868828177452087,-0.124354444444180,-0.181666657328606,-0.195905774831772,-0.125622928142548,-0.106693975627422,0.028441198170185) * FEATURE3_texOff(vec2(1,0));
res += mat4(0.079589925706387,-0.118924207985401,0.136349752545357,-0.050111826509237,0.227971002459526,0.044460795819759,-0.004753521643579,0.079112239181995,0.239583820104599,0.162334993481636,0.179646015167236,0.040658697485924,0.127307280898094,-0.124979220330715,0.043356601148844,-0.193065643310547) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.577778577804565,-0.007624752819538,0.189364150166512,-0.670270323753357) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.041834514588118,-0.163173884153366,-0.007610670756549,-0.185724750161171);
res += mat4(0.015726737678051,0.300596803426743,-0.183077216148376,0.038077067583799,-0.196375980973244,0.128676220774651,-0.103358514606953,-0.023678857833147,0.246404588222504,0.000700905802660,-0.041276421397924,-0.236218571662903,0.049198936671019,-0.161122098565102,0.022170310840011,-0.053462583571672) * FEATURE1_texOff(vec2(-1,-1));
res += mat4(-0.230502724647522,-0.076767601072788,-0.028726803138852,0.070449076592922,-0.040881458669901,0.044108364731073,0.199068859219551,0.078248836100101,-0.132928505539894,-0.514592170715332,0.348787158727646,0.081958636641502,0.019045025110245,-0.045442689210176,0.171831265091896,-0.043802283704281) * FEATURE1_texOff(vec2(-1,0));
res += mat4(0.007561409380287,-0.022615814581513,-0.087811410427094,0.018083961680532,0.132834255695343,0.228667944669724,-0.109184272587299,-0.078065723180771,0.202809795737267,0.143304750323296,0.149949848651886,0.288936972618103,0.006482542026788,-0.031667448580265,0.047541376203299,-0.028849408030510) * FEATURE1_texOff(vec2(-1,1));
res += mat4(0.246931314468384,-0.236739188432693,0.086583584547043,0.016312591731548,0.008016454987228,0.030226768925786,0.247259199619293,0.138064891099930,-0.856737852096558,-0.510426700115204,0.008226728998125,-0.013233238831162,-0.042556233704090,0.175718188285828,-0.257207423448563,-0.035656947642565) * FEATURE1_texOff(vec2(0,-1));
res += mat4(-0.341516822576523,-0.427335411310196,0.243216559290886,-0.038399014621973,0.062064707279205,0.076815597712994,-0.169784381985664,0.259950965642929,0.365622192621231,0.465880662202835,-0.421436339616776,0.294497132301331,0.066777855157852,0.156047716736794,-0.030041208490729,0.165338650345802) * FEATURE1_texOff(vec2(0,0));
res += mat4(0.021573545411229,-0.054693821817636,-0.044400911778212,0.056382577866316,-0.480077803134918,-0.242053121328354,0.302954345941544,0.450770169496536,-0.118061825633049,0.149546578526497,-0.072417572140694,-0.071978867053986,-0.010735803283751,0.101082086563110,0.009424308314919,-0.008183673955500) * FEATURE1_texOff(vec2(0,1));
res += mat4(-0.047015823423862,-0.089959211647511,-0.013018398545682,-0.052889823913574,-0.027647549286485,0.102811209857464,0.043380036950111,-0.138024568557739,0.005145994015038,0.126669034361839,-0.176633656024933,0.191531315445900,0.176689147949219,-0.342577546834946,-0.593146324157715,-0.276543766260147) * FEATURE1_texOff(vec2(1,-1));
res += mat4(-0.064392007887363,0.063303962349892,-0.154169425368309,-0.197141468524933,0.189561441540718,0.041828684508801,-0.062397275120020,-0.296560257673264,0.044108405709267,0.129987597465515,0.267466038465500,-0.354376107454300,-0.074300251901150,0.120697684586048,0.103591166436672,0.110987119376659) * FEATURE1_texOff(vec2(1,0));
res += mat4(-0.077475413680077,0.094246543943882,-0.240943968296051,0.153667509555817,0.183718502521515,-0.221062615513802,-0.015902919694781,0.014727276749909,0.084878250956535,-0.162332966923714,0.026898730546236,-0.063094966113567,-0.133644998073578,-0.030994564294815,-0.132480695843697,0.048430442810059) * FEATURE1_texOff(vec2(1,1));
res += mat4(0.111190974712372,0.006681575439870,-0.062720805406570,-0.013512250036001,0.069589741528034,-0.063024766743183,0.119015648961067,0.390779227018356,-0.274330854415894,-0.091447949409485,-0.023032708093524,-0.136787056922913,0.047224119305611,-0.376129686832428,0.043391633778811,-0.086796119809151) * FEATURE2_texOff(vec2(-1,-1));
res += mat4(-0.148707628250122,-0.098279200494289,0.008611386641860,-0.086686104536057,0.150097593665123,0.194461673498154,-0.163184851408005,0.145710274577141,0.188643246889114,-0.491034567356110,-0.108519092202187,0.229889243841171,-0.045158673077822,-0.091418318450451,0.065220586955547,-0.075018286705017) * FEATURE2_texOff(vec2(-1,0));
res += mat4(0.130292400717735,-0.058876119554043,0.235120028257370,0.207090556621552,-0.098579272627831,0.097184874117374,0.131174176931381,-0.344669789075851,0.018533786758780,-0.007385496050119,0.055071577429771,-0.029460005462170,0.039309859275818,-0.101451031863689,-0.147919297218323,-0.103609502315521) * FEATURE2_texOff(vec2(-1,1));
res += mat4(0.302176535129547,0.039576273411512,0.064579062163830,-0.153497457504272,-0.280952990055084,-0.212368249893188,-0.239046514034271,-0.010170552879572,-0.452860295772552,-0.441199094057083,0.262635767459869,0.311005622148514,-0.180800959467888,0.440387010574341,0.401951253414154,0.305175215005875) * FEATURE2_texOff(vec2(0,-1));
res += mat4(-0.615703821182251,-0.321001470088959,-0.062322147190571,-0.193962767720222,0.580384910106659,0.306849360466003,0.436610400676727,-0.001813278300688,-0.008430674672127,0.692635238170624,-0.146878853440285,0.494176536798477,0.116212993860245,0.184836506843567,0.011059416458011,0.012862570583820) * FEATURE2_texOff(vec2(0,0));
res += mat4(0.240138426423073,0.493294060230255,0.064174525439739,0.288812965154648,-0.227605089545250,-0.077025376260281,-0.226480230689049,-0.291972339153290,0.423723965883255,0.170536041259766,0.134983405470848,-0.301582753658295,0.073016285896301,0.075071468949318,0.056804925203323,0.088949032127857) * FEATURE2_texOff(vec2(0,1));
res += mat4(0.204882472753525,0.062025740742683,0.022639993578196,-0.143795400857925,0.177330330014229,-0.095391653478146,0.159268379211426,0.016907865181565,-0.033838365226984,0.033668559044600,-0.002539483597502,-0.098819486796856,0.040386132895947,0.206493958830833,0.082770511507988,0.057717770338058) * FEATURE2_texOff(vec2(1,-1));
res += mat4(-0.083751522004604,-0.234669566154480,-0.124864757061005,-0.124715693295002,-0.007157894317061,-0.029821936041117,0.111814498901367,-0.020403223112226,-0.260909914970398,0.164363577961922,0.227345287799835,-0.390076249837875,0.047459103167057,-0.427252650260925,-0.347628593444824,-0.231161549687386) * FEATURE2_texOff(vec2(1,0));
res += mat4(-0.134844601154327,0.141438066959381,0.170706823468208,0.160374224185944,-0.112780794501305,-0.061896447092295,-0.181104317307472,-0.079853042960167,-0.143307283520699,-0.246887266635895,-0.101434424519539,-0.199813127517700,0.036119136959314,0.050728440284729,-0.050980754196644,0.000528110540472) * FEATURE2_texOff(vec2(1,1));
res += mat4(0.032970361411572,0.084608964622021,-0.046167276799679,-0.162987500429153,0.015392300672829,-0.178913235664368,0.122320003807545,0.243544995784760,0.256618797779083,-0.128461137413979,0.023188702762127,-0.089442834258080,0.254166871309280,-0.011812966316938,0.103709891438484,-0.141752645373344) * FEATURE3_texOff(vec2(-1,-1));
res += mat4(-0.063660003244877,0.297857522964478,-0.340185344219208,-0.238134235143661,0.057757135480642,0.038440439850092,0.250439912080765,-0.085017003118992,-0.273531496524811,-0.161417886614799,0.072218753397465,-0.191228643059731,0.099594980478287,-0.223231121897697,0.308847367763519,0.094771340489388) * FEATURE3_texOff(vec2(-1,0));
res += mat4(-0.060644440352917,0.069257214665413,-0.100346922874451,-0.153554201126099,0.041943732649088,-0.037117876112461,-0.104900568723679,-0.078844070434570,0.038317970931530,0.109213955700397,0.167337998747826,0.004251955542713,-0.074223332107067,0.022557010874152,0.299039155244827,0.005906428210437) * FEATURE3_texOff(vec2(-1,1));
res += mat4(0.260202199220657,-0.105231665074825,-0.042530070990324,-0.279992908239365,-0.175956889986992,0.115465827286243,0.508212447166443,0.348177552223206,0.244004383683205,0.255646765232086,-0.142441898584366,0.108848139643669,0.299671351909637,-0.113313637673855,-0.246080949902534,-0.092138156294823) * FEATURE3_texOff(vec2(0,-1));
res += mat4(-0.407861560583115,-0.262749612331390,0.229008674621582,-0.136062756180763,-0.006001418922096,0.417563557624817,0.396855801343918,0.413753211498260,0.204519748687744,-0.078010492026806,0.027774106711149,0.072131507098675,0.211052909493446,-0.126860424876213,-0.029470322653651,0.227708086371422) * FEATURE3_texOff(vec2(0,0));
res += mat4(-0.170501574873924,0.032348372042179,-0.010303189046681,0.086306050419807,0.048741932958364,-0.006290480028838,-0.161952748894691,-0.039056092500687,-0.118888616561890,-0.012418108992279,-0.332732170820236,-0.110302425920963,-0.161545768380165,-0.182762503623962,-0.016165586188436,-0.011805015616119) * FEATURE3_texOff(vec2(0,1));
res += mat4(0.094475694000721,-0.168330997228622,0.230529248714447,-0.015968535095453,0.056079570204020,-0.055657599121332,-0.183550834655762,-0.155450344085693,-0.177108585834503,-0.149793773889542,0.034691285341978,-0.179050892591476,0.094931021332741,0.104203477501869,-0.030646784231067,0.070355787873268) * FEATURE3_texOff(vec2(1,-1));
res += mat4(0.031290795654058,-0.305047065019608,0.048170875757933,0.173178181052208,0.006962378975004,-0.103527791798115,0.031756304204464,-0.084562994539738,-0.041466377675533,0.073994718492031,-0.118310131132603,0.348628133535385,0.106954924762249,0.082664377987385,0.009244152344763,-0.064233094453812) * FEATURE3_texOff(vec2(1,0));
res += mat4(-0.106272354722023,0.014839386567473,-0.063652969896793,0.171818152070045,-0.035513497889042,-0.009021545760334,-0.200808897614479,-0.161749958992004,0.056673236191273,-0.072359949350357,0.252996772527695,0.071204409003258,-0.063041441142559,-0.255761951208115,-0.168113172054291,0.113976508378983) * FEATURE3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.404346406459808,0.142220005393028,0.775457859039307,0.205513477325439) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL4
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 2_1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.091971635818481,0.252419114112854,0.044147212058306,0.170001760125160);
res += mat4(0.114717125892639,0.096598386764526,-0.080388978123665,0.193825006484985,-0.014032469131052,0.073846198618412,-0.049153722822666,-0.036539882421494,-0.125950247049332,-0.292941868305206,-0.008635228499770,-0.166280284523964,-0.021197348833084,-0.032207176089287,0.054811239242554,-0.135928019881248) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.046274755150080,-0.084411211311817,-0.223174870014191,-0.196178331971169,0.107715286314487,0.018291184678674,0.471041589975357,-0.061761274933815,-0.118095807731152,0.175762444734573,0.028835387900472,-0.142798185348511,-0.111554525792599,0.019150085747242,-0.129065409302711,-0.040002360939980) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.061635334044695,-0.148759394884109,-0.018479146063328,-0.258893847465515,0.100222386419773,0.012059654109180,-0.251965194940567,0.057135257869959,-0.011283029802144,0.097535833716393,0.103713460266590,-0.089596308767796,-0.139147415757179,-0.112721569836140,0.082156583666801,-0.099269710481167) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.054832506924868,-0.031383205205202,-0.040407344698906,0.108191020786762,-0.239842936396599,-0.019330702722073,0.107929766178131,0.063624382019043,-0.285097956657410,0.251133918762207,0.194058030843735,-0.095215164124966,-0.354686528444290,-0.015297115780413,0.076094955205917,-0.046620137989521) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.358484596014023,-0.249671742320061,0.140221610665321,-0.195989638566971,-0.169798195362091,-0.048706438392401,-0.055002022534609,-0.019934605807066,0.021607114002109,-0.035344075411558,0.146627113223076,0.114247351884842,0.678108155727386,-0.160452336072922,0.784844636917114,-0.750964999198914) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.210336595773697,-0.405923604965210,0.010786559432745,0.129219636321068,0.306348860263824,0.096347868442535,0.348785281181335,-0.257233649492264,0.206419125199318,0.174258813261986,0.191864266991615,0.381654560565948,0.042163547128439,0.233129173517227,-0.092269681394100,-0.011364613659680) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.045256394892931,0.070739232003689,-0.017239462584257,-0.029109926894307,-0.085177138447762,0.091329544782639,0.004853379447013,-0.131918549537659,-0.108120404183865,0.187379285693169,-0.086710967123508,-0.080878525972366,-0.258711487054825,0.183944985270500,-0.106938958168030,0.002135023241863) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.098823234438896,0.033729054033756,0.099441096186638,0.050389431416988,0.099798433482647,0.345790445804596,-0.184944137930870,-0.069360032677650,0.594019949436188,-0.206006079912186,-0.529945969581604,0.327157050371170,-0.170272484421730,0.202562123537064,-0.524525880813599,0.048674710094929) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.058139469474554,0.455226540565491,-0.151312842965126,0.105299621820450,0.116567686200142,-0.034555375576019,-0.083992511034012,-0.130068331956863,0.204107940196991,-0.242588132619858,0.017625318840146,0.150120168924332,-0.177763640880585,0.031737662851810,-0.046081051230431,0.114180125296116) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.027001671493053,0.042524538934231,-0.149660974740982,0.310233175754547,0.120094642043114,-0.153631865978241,-0.047484986484051,-0.011137795634568,-0.005174555350095,0.279959440231323,-0.215231552720070,-0.142408758401871,-0.075294353067875,0.025395642966032,0.009794521145523,-0.117535576224327) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.010593394748867,0.052928980439901,-0.244212582707405,0.327176988124847,0.055346876382828,-0.299528062343597,-0.005482893902808,-0.172697618603706,0.025327220559120,-0.155764341354370,-0.028691438958049,-0.222424075007439,-0.114505358040333,-0.040643777698278,0.108892858028412,-0.283422976732254) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.091960661113262,0.156299829483032,-0.043010454624891,0.118214212357998,-0.033847466111183,0.074777849018574,0.192027419805527,0.018821051344275,-0.023723090067506,0.352447777986526,0.026168083772063,-0.161040231585503,-0.014892363920808,0.089708380401134,0.058477930724621,-0.092579327523708) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.087037838995457,0.188667371869087,0.288206338882446,-0.337765127420425,0.230373933911324,-0.000714021502063,-0.183591738343239,0.092143483459949,0.000311031413730,0.550876021385193,-0.199652671813965,0.014559096656740,-0.058434572070837,-0.195685893297195,0.488652616739273,-0.021109117195010) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.033248595893383,-0.189988061785698,0.298276156187057,-0.056148286908865,-0.051709763705730,0.096773259341717,0.605917572975159,-0.231173589825630,-0.166160896420479,0.184560507535934,-0.065165035426617,0.085311822593212,-0.332377970218658,-0.095610208809376,-0.416615515947342,0.388628095388412) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.055568121373653,0.121823333203793,-0.014395160600543,0.150636166334152,-0.082601457834244,0.236079260706902,0.161273762583733,-0.141790166497231,-0.041345812380314,0.212754935026169,0.018371328711510,-0.213734805583954,0.104403786361217,0.335446655750275,-0.115165539085865,0.020300148054957) * MODEL2_texOff(vec2(0,1));
res += mat4(0.185505434870720,-0.175858497619629,-0.121374838054180,-0.201055571436882,0.230787768959999,0.471791893243790,-0.221965849399567,0.040775086730719,0.005323357880116,0.238021075725555,-0.008741418831050,-0.035675413906574,0.007467470131814,0.087108694016933,0.105805359780788,-0.171698093414307) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.712988317012787,0.331145435571671,-0.304965436458588,0.116236262023449,-0.155243054032326,-0.069081671535969,0.189191266894341,-0.337130755186081,-0.038531046360731,0.007234499324113,-0.050167325884104,-0.018630014732480,0.549826145172119,-0.018822597339749,0.228666901588440,-0.199988469481468) * MODEL2_texOff(vec2(1,0));
res += mat4(0.039224527776241,-0.057349007576704,-0.046293269842863,-0.063242264091969,0.032392855733633,-0.218298241496086,-0.301817536354065,-0.060627967119217,-0.023021699860692,0.157920166850090,0.042707629501820,-0.076824441552162,0.075299300253391,0.042636219412088,0.245972454547882,0.171524599194527) * MODEL2_texOff(vec2(1,1));
res += mat4(0.021667020395398,0.181352943181992,-0.036807414144278,-0.031740818172693,-0.103678181767464,-0.080949142575264,0.066855408251286,-0.165935754776001,0.132284462451935,-0.003806926077232,0.015956019982696,-0.108191579580307,0.021441061049700,0.044714208692312,0.029114743694663,0.017437828704715) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.155099689960480,-0.052328210324049,-0.256041705608368,0.154969155788422,-0.015977852046490,-0.112587422132492,-0.189507856965065,-0.211596667766571,0.128862872719765,-0.065276212990284,0.225200131535530,0.060740746557713,-0.072216562926769,0.021227436140180,0.192025139927864,0.002756781643257) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.047239903360605,0.173734232783318,-0.223841175436974,0.056148961186409,-0.080018430948257,-0.021092742681503,0.138056039810181,-0.155607938766479,0.078460834920406,0.005527105182409,-0.061311516910791,0.105109304189682,-0.026647316291928,-0.265405684709549,0.088043980300426,-0.024585470557213) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.135376274585724,-0.240994498133659,-0.108636654913425,0.103175796568394,-0.024723637849092,-0.039188191294670,-0.142973735928535,0.129197508096695,-0.005145732313395,-0.268020957708359,0.241405397653580,-0.028734249994159,-0.010737850330770,-0.115753568708897,-0.074293717741966,-0.038316290825605) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.197960138320923,-0.280840367078781,-0.220652386546135,0.207158312201500,-0.505054354667664,0.161417722702026,0.402734875679016,-0.447345077991486,-0.112195141613483,0.108906164765358,0.335129767656326,-0.272139757871628,0.171925306320190,-0.678571760654449,-0.032286345958710,0.335724830627441) * MODEL3_texOff(vec2(0,0));
res += mat4(0.041831538081169,0.054008178412914,-0.287039548158646,0.011360995471478,0.070085987448692,-0.076249323785305,-0.107708744704723,0.643271863460541,0.134593531489372,-0.178669899702072,0.096174657344818,-0.447779089212418,-0.023324435576797,-0.954633116722107,0.068573594093323,-0.036910150200129) * MODEL3_texOff(vec2(0,1));
res += mat4(0.153546914458275,-0.151515826582909,-0.078137069940567,0.002088425215334,0.013856649398804,0.158989161252975,-0.110961064696312,0.310185283422470,-0.011167120188475,-0.021422684192657,-0.069339588284492,0.185433417558670,0.013472187332809,0.014162645675242,0.038295041769743,0.022897630929947) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.021793158724904,-0.610160052776337,-0.271873205900192,-0.426044434309006,0.110500626266003,-0.142467856407166,-0.259323209524155,0.427601128816605,-0.297271609306335,0.025882471352816,0.112664885818958,0.209091961383820,0.037527553737164,-0.493285477161407,0.112536288797855,0.095807805657387) * MODEL3_texOff(vec2(1,0));
res += mat4(0.131892681121826,-0.266494035720825,-0.159916281700134,-0.132563754916191,0.019580472260714,-0.066731192171574,-0.038406617939472,0.068426951766014,0.029579853639007,-0.008046684786677,0.142468243837357,-0.294668972492218,0.052970938384533,-0.710728168487549,0.079307571053505,-0.178283721208572) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.785958409309387,0.012812061235309,0.597810447216034,0.093359157443047) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.113105230033398,0.065831236541271,0.296176403760910,0.188494667410851);
res += mat4(0.424175143241882,0.348008602857590,0.175270497798920,0.234815359115601,-0.096296928822994,-0.216539129614830,-0.218235865235329,0.137699410319328,-0.017833519726992,0.142107173800468,-0.058678649365902,0.068153016269207,0.190849527716637,-0.007710063364357,-0.060951005667448,-0.199732422828674) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.035790435969830,0.313135087490082,0.195539578795433,0.112232394516468,-0.105267211794853,0.177444294095039,0.570989847183228,0.599901497364044,0.165550082921982,-0.426930457353592,0.002177114831284,-0.263576716184616,0.160598516464233,0.551801502704620,0.254336208105087,-0.140740141272545) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.118025235831738,0.010411744005978,0.025547962635756,-0.119268871843815,-0.424321085214615,0.368715912103653,0.268957406282425,-0.344154298305511,0.003634874476120,0.022487659007311,0.152504056692123,0.158833160996437,-0.066163934767246,0.223597884178162,0.136819988489151,0.175508901476860) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.224853023886681,0.235828608274460,0.093624904751778,-0.368019521236420,-0.114804171025753,0.028713947162032,0.099271692335606,0.020460989326239,0.689380526542664,-0.029792197048664,-0.152530610561371,0.081376329064369,0.151277750730515,-0.127863019704819,-0.071818999946117,-0.271288484334946) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.538144528865814,-0.151527792215347,-0.313099533319473,0.199794009327888,-0.131648257374763,-0.069451153278351,0.155364871025085,-0.155857443809509,-0.305273920297623,0.507089972496033,0.372032552957535,0.398665875196457,0.594135046005249,-0.287595689296722,-0.208317473530769,0.142996847629547) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.000243687085458,0.150565579533577,0.177644267678261,-0.264759033918381,-0.128420293331146,0.041914042085409,0.156963497400284,0.094836600124836,-0.135915353894234,0.169186055660248,0.079720795154572,-0.172596126794815,0.187960818409920,-0.019886588677764,-0.076369188725948,0.027580667287111) * MODEL1_texOff(vec2(0,1));
res += mat4(0.015469615347683,-0.396708935499191,-0.292397588491440,0.146268501877785,0.043898697942495,0.066825129091740,0.022521538659930,-0.127231955528259,-0.101817265152931,0.006329788360745,-0.073251634836197,-0.032753128558397,-0.171465814113617,-0.059542350471020,0.108895242214203,0.112370222806931) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.158628195524216,-0.067164458334446,-0.109723024070263,0.015063530765474,0.152707278728485,0.013955439440906,-0.041082467883825,0.038253061473370,0.299984067678452,-0.168840020895004,-0.188813909888268,0.017654350027442,0.064298547804356,-0.123246461153030,0.046043828129768,0.019275560975075) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.017396619543433,-0.053442500531673,-0.164813593029976,0.069440953433514,0.012680480256677,-0.014855229295790,0.005428494419903,0.015788123011589,-0.059974987059832,-0.213808462023735,-0.005513943731785,0.053260561078787,-0.092840082943439,0.013948221690953,0.107831247150898,0.096238531172276) * MODEL1_texOff(vec2(1,1));
res += mat4(0.319465547800064,-0.042899128049612,0.223492562770844,0.112754993140697,-0.096617393195629,0.056476987898350,-0.102171853184700,0.208590447902679,-0.214055657386780,0.006039024796337,-0.128516748547554,-0.337258130311966,0.314113885164261,-0.238712236285210,0.111633792519569,-0.112027823925018) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.101988784968853,0.050201673060656,0.154809847474098,-0.336086124181747,0.030267264693975,-0.017009222880006,0.229953199625015,-0.329067617654800,-0.257418185472488,-0.650377035140991,-0.204703167080879,-0.490021884441376,0.072620645165443,-0.115604311227798,0.268637210130692,-0.005305594298989) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.422559440135956,-0.031333606690168,0.257863461971283,-0.098848447203636,0.150288209319115,-0.023819858208299,-0.247022375464439,-0.138436391949654,-0.025969214737415,-0.075824938714504,0.024955851957202,-0.028358548879623,0.201749831438065,-0.018680410459638,-0.020112628117204,0.006574299652129) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.394448846578598,0.019808445125818,-0.193160876631737,-0.081325888633728,-0.087201453745365,-0.041921500116587,-0.576802134513855,0.142563611268997,-0.232323005795479,-0.039040643721819,-0.081950664520264,-0.312468707561493,0.064048528671265,0.201166212558746,0.381034642457962,0.638171136379242) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.454214006662369,-0.030138181522489,-0.050244841724634,0.117431133985519,-0.511590838432312,0.132304489612579,0.369166016578674,-0.348925679922104,-0.123759508132935,0.012942805886269,-0.003948051948100,-0.363745957612991,-0.050179231911898,-0.211269423365593,-0.028486896306276,-0.076219119131565) * MODEL2_texOff(vec2(0,0));
res += mat4(0.228804603219032,-0.058993466198444,-0.057525265961885,-0.036562342196703,0.249973088502884,-0.354898661375046,-0.853050827980042,0.396122425794601,-0.078077718615532,-0.034185908734798,-0.033337168395519,0.003068093210459,0.042484439909458,-0.022299762815237,-0.054660409688950,-0.075150132179260) * MODEL2_texOff(vec2(0,1));
res += mat4(0.192054197192192,0.055966932326555,0.089611768722534,-0.030313838273287,0.114353701472282,0.040871795266867,-0.048967342823744,-0.110669478774071,-0.016925724223256,-0.079173207283020,-0.054653752595186,-0.153443962335587,-0.339134842157364,-0.051872897893190,0.024910228326917,-0.162317499518394) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.199901342391968,0.080932684242725,0.145472288131714,0.039352238178253,-0.128072142601013,0.023423910140991,-0.117724262177944,-0.111579708755016,-0.121913224458694,-0.086995087563992,-0.064220160245895,-0.212562650442123,-0.179425746202469,-0.005505632143468,-0.079423978924751,0.125829085707664) * MODEL2_texOff(vec2(1,0));
res += mat4(0.100327581167221,0.003719558240846,-0.094085760414600,0.010928178206086,-0.057947561144829,0.025474634021521,-0.141863450407982,-0.228458821773529,-0.127251908183098,-0.060537271201611,-0.059589456766844,-0.027355343103409,0.126929283142090,-0.008972864598036,0.063361212611198,0.011590955778956) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.021578924730420,0.023393547162414,-0.027067212387919,-0.070351727306843,-0.253141134977341,-0.153062686324120,-0.262675255537033,0.238001957535744,-0.037093393504620,-0.088304959237576,0.059314806014299,-0.085272930562496,-0.225430667400360,0.004030162468553,-0.080160155892372,0.395072996616364) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.014240025542676,-0.029078600928187,-0.461101591587067,-0.316544324159622,0.254943728446960,0.105996064841747,0.160349756479263,0.285632461309433,0.249403923749924,-0.372599989175797,0.066342063248158,-0.015254795551300,-0.113857641816139,0.191775187849998,-0.007910554297268,-0.064404681324959) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.308749109506607,-0.045525152236223,-0.488268613815308,-0.138731583952904,-0.075199164450169,-0.038740213960409,-0.025016577914357,0.019992107525468,0.180388852953911,-0.001734571764246,0.513486444950104,-0.302973002195358,-0.006159284617752,-0.030328731983900,-0.300534069538116,0.200533792376518) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.124726764857769,0.016500826925039,-0.121220886707306,-0.056364275515079,-0.050494384020567,-0.079298257827759,-0.097748339176178,-0.128283828496933,0.034147109836340,0.071841277182102,-0.028291253373027,0.200512751936913,-0.536764800548553,0.179269284009933,-0.022737000137568,0.133803591132164) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.604821503162384,0.017859155312181,-0.494385212659836,-0.250606864690781,0.526344537734985,-0.194344550371170,-0.161702692508698,-0.409182786941528,0.114905290305614,0.471897304058075,0.140553191304207,0.384389072656631,0.188712388277054,0.564284801483154,0.044955834746361,-0.186823293566704) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.777697503566742,-0.132459402084351,-0.503385007381439,0.116457730531693,-0.231363847851753,-0.307895809412003,-0.406840205192566,-0.110842287540436,-0.010034069418907,0.287793248891830,0.182738989591599,-0.167009860277176,0.242781072854996,0.105162888765335,-0.020925363525748,0.041384965181351) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.116649232804775,-0.026481634005904,-0.033052977174520,0.051089081913233,-0.016773302108049,0.000182264993782,0.091504395008087,-0.149458229541779,-0.052242923527956,-0.003352604107931,0.064355142414570,-0.123127602040768,-0.027056101709604,0.019047848880291,-0.205060467123985,0.153470695018768) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.048503372818232,0.037244368344545,-0.002185991033912,-0.003876538714394,-0.366231143474579,-0.265368312597275,-0.211810827255249,-0.265378773212433,0.010599253699183,-0.013022641651332,-0.097382172942162,-0.226584553718567,-0.235739484429359,-0.005343814846128,0.076145499944687,-0.013744411990047) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.071878761053085,0.106716535985470,-0.102681443095207,-0.106411121785641,-0.084511257708073,-0.028561819344759,-0.038562331348658,-0.015624398365617,0.173312619328499,0.167174503207207,0.107858121395111,0.117125302553177,0.258791565895081,-0.048324458301067,-0.073686160147190,0.150190606713295) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.009510209783912,-0.394413977861404,0.392579704523087,0.679786443710327) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL5
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 2_2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.075868673622608,0.035710752010345,-0.003867128631100,-0.068260274827480);
res += mat4(-0.176240906119347,-0.065886959433556,-0.021844459697604,-0.035620789974928,0.071389742195606,0.065520845353603,-0.206714853644371,0.059716407209635,-0.033658150583506,-0.053695507347584,0.099316246807575,0.114057250320911,0.064498431980610,0.181966096162796,-0.191605329513550,0.082614131271839) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.090471513569355,0.329073011875153,0.070915825664997,-0.016063302755356,0.076056972146034,0.174285292625427,-0.056607928127050,-0.016927091404796,0.149537920951843,0.010074914433062,0.115451723337173,0.348566472530365,-0.062728323042393,0.115166284143925,0.115446992218494,-0.295339852571487) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.015444891527295,0.131204679608345,0.028362860903144,0.028105240315199,0.132351621985435,0.019123358651996,-0.048192407935858,-0.093864582479000,-0.098095335066319,-0.018559947609901,0.121622212231159,-0.148841202259064,-0.090493261814117,-0.060616638511419,0.055524341762066,0.067848384380341) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.091000109910965,0.258406311273575,0.031554315239191,0.025486666709185,0.310777187347412,-0.160535514354706,-0.048086259514093,-0.073421843349934,0.216993853449821,-0.263083040714264,0.488098770380020,-0.187680438160896,0.192972987890244,0.421746253967285,-0.517106890678406,0.180681928992271) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.246782049536705,0.156478613615036,0.205147355794907,-0.412392556667328,-0.063213452696800,0.216239303350449,-0.594268560409546,0.265462636947632,0.942439258098602,-0.711920320987701,-0.217055529356003,-0.552364110946655,-0.123042374849319,-0.345057547092438,0.346925228834152,-0.186016663908958) * MODEL1_texOff(vec2(0,0));
res += mat4(0.085298776626587,0.008004118688405,0.270001381635666,-0.175438866019249,-0.172648280858994,-0.089388720691204,-0.034011509269476,-0.180909425020218,0.157840266823769,0.124535687267780,-0.167108252644539,0.249510094523430,-0.093351505696774,0.096374124288559,0.062770746648312,-0.203718468546867) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.056565076112747,0.126929461956024,0.047711536288261,-0.222804591059685,0.108812294900417,0.240733116865158,-0.031709551811218,-0.254904538393021,-0.065596267580986,0.159583136439323,-0.076469294726849,0.004087167326361,0.005201268475503,0.017017984762788,-0.315962046384811,-0.557077288627625) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.080598354339600,0.175176918506622,-0.104040883481503,-0.399319261312485,-0.087801076471806,0.166419520974159,-0.105237379670143,-0.321114927530289,0.141637682914734,-0.115230791270733,0.054453480988741,0.058400388807058,0.095132112503052,-0.112352997064590,0.075195573270321,0.327127605676651) * MODEL1_texOff(vec2(1,0));
res += mat4(0.094899281859398,0.054335564374924,-0.007662943098694,-0.394221484661102,-0.106581248342991,0.022373264655471,-0.037282135337591,0.296636492013931,-0.055498849600554,-0.073268808424473,0.134282469749451,0.055026575922966,0.047983836382627,0.020104587078094,0.124399721622467,0.040146902203560) * MODEL1_texOff(vec2(1,1));
res += mat4(0.057005334645510,-0.369184076786041,0.102691814303398,-0.049743667244911,-0.120045572519302,0.007842381484807,0.145091205835342,0.210474029183388,-0.070735409855843,-0.163231447339058,-0.253511250019073,0.333526730537415,0.150044247508049,0.114015549421310,0.020837789401412,0.126611784100533) * MODEL2_texOff(vec2(-1,-1));
res += mat4(0.257059842348099,0.020246241241693,0.054240111261606,-0.019554359838367,-0.269934087991714,0.044601619243622,-0.137627869844437,-0.158718511462212,0.088256306946278,0.260563701391220,0.057359322905540,0.300970166921616,-0.059776183217764,0.225642323493958,-0.040529605001211,0.204777047038078) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.211516112089157,-0.018009334802628,0.156602501869202,-0.238226577639580,0.015784319490194,0.249237865209579,-0.048013076186180,0.185383141040802,-0.046428825706244,-0.014729772694409,0.075935743749142,0.222996488213539,-0.114277020096779,-0.139318764209747,0.112722486257553,-0.043814595788717) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.043830107897520,-0.022900922223926,0.233558401465416,-0.467791944742203,-0.526940584182739,-0.370258361101151,0.040624540299177,-0.304237633943558,-0.114537835121155,-0.167247146368027,-0.021237285807729,0.132926911115646,0.021972611546516,-0.597173273563385,0.598439812660217,-0.362479984760284) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.241402089595795,-0.291285157203674,0.141772702336311,-0.640805721282959,-0.332239568233490,0.282611817121506,0.170926570892334,0.268469363451004,-0.016388168558478,0.021549927070737,0.006426879204810,0.317413032054901,0.254882872104645,0.441983997821808,-0.031502213329077,0.078962840139866) * MODEL2_texOff(vec2(0,0));
res += mat4(0.239698961377144,-0.063513807952404,-0.061114903539419,-0.037592913955450,-0.144203662872314,-0.016003046184778,-0.070594586431980,0.050031661987305,0.004555498715490,0.017484132200480,-0.001974815502763,0.313583612442017,-0.069912940263748,-0.009114687331021,0.026912288740277,0.109356574714184) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.080170720815659,0.231238201260567,0.240871071815491,0.119066864252090,-0.283021062612534,0.154770389199257,0.075725547969341,-0.575339555740356,-0.040127620100975,-0.064921975135803,-0.033399559557438,0.014500597491860,0.047010783106089,0.205493032932281,-0.101074598729610,-0.006968983449042) * MODEL2_texOff(vec2(1,-1));
res += mat4(-0.130050301551819,-0.282735049724579,-0.034000061452389,-0.105366185307503,-0.149283304810524,0.144736185669899,-0.273070156574249,-0.151254326105118,-0.007927614264190,-0.052933182567358,0.067679956555367,0.183263257145882,-0.054420728236437,-0.057059615850449,0.105633668601513,0.081026688218117) * MODEL2_texOff(vec2(1,0));
res += mat4(0.080719739198685,-0.081599585711956,0.049706630408764,-0.160488456487656,0.042445562779903,-0.147306695580482,0.068635053932667,0.249872952699661,-0.053532693535089,0.036656882613897,0.059283431619406,0.271747618913651,-0.052702099084854,-0.013226037845016,0.060848683118820,-0.118034198880196) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.028931174427271,0.085246279835701,0.012313949875534,-0.031266473233700,0.001517970464192,0.098422653973103,0.113498091697693,-0.148559406399727,0.083223722875118,-0.199693292379379,-0.018744863569736,0.142262652516365,-0.053993847221136,-0.069741979241371,-0.090613536536694,-0.142990648746490) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.075109824538231,-0.011751163750887,0.071981973946095,0.081951148808002,0.170808762311935,-0.300679653882980,-0.196997329592705,0.039322443306446,0.084233865141869,-0.168728038668633,-0.120131202042103,0.083845496177673,-0.051398925483227,-0.034952763468027,0.006456998176873,-0.123392902314663) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.006006305571645,0.028544235974550,0.067726813256741,0.017741410061717,0.154158204793930,0.095700770616531,-0.037322077900171,0.226316690444946,-0.025610124692321,-0.001376197906211,-0.175897657871246,-0.106769017875195,-0.057578712701797,0.017536655068398,-0.098671860992908,-0.303302943706512) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.003849863307551,-0.077773712575436,0.080521181225777,-0.019696613773704,0.203779026865959,0.672195315361023,0.033670768141747,0.169643118977547,-0.141900643706322,-0.218751534819603,0.287123262882233,-0.052832223474979,0.030374871566892,-0.207334861159325,0.136345326900482,-0.118302665650845) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.048683371394873,0.004938193131238,0.108625046908855,0.186852276325226,-1.253694772720337,-0.572749555110931,0.376015007495880,-0.388406306505203,-0.104707598686218,-0.317798972129822,0.016433153301477,-0.115310110151768,0.131207555532455,-0.127493366599083,-0.706815242767334,-0.078303374350071) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.008681007660925,0.011823335662484,0.037385486066341,0.068943522870541,-0.005725828465074,0.002401815028861,-0.113159678876400,0.001569489948452,0.059579685330391,-0.131444111466408,-0.117231845855713,0.136381670832634,0.056141346693039,0.103185161948204,-0.214308470487595,-0.240960195660591) * MODEL3_texOff(vec2(0,1));
res += mat4(0.021645961329341,-0.054529886692762,-0.089867509901524,0.090653486549854,0.075828127563000,0.006224452052265,0.043934375047684,-0.067969545722008,-0.104756824672222,-0.580395221710205,0.288183063268661,0.186275899410248,-0.037836305797100,-0.281366884708405,-0.149161040782928,-0.250442504882813) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.200171172618866,0.280878484249115,-0.128009766340256,0.354526072740555,0.091364510357380,-0.231188848614693,0.028368700295687,0.292112708091736,0.058047823607922,-0.104723244905472,-0.148319542407990,0.057268720120192,-0.013671019114554,-0.188601195812225,-0.027048420161009,0.180564790964127) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.049254275858402,0.007748651318252,-0.032225709408522,-0.032287932932377,0.205150067806244,0.065306909382343,-0.046082042157650,-0.016132012009621,-0.076085999608040,-0.024538481608033,-0.178128957748413,0.289388656616211,0.037966396659613,0.086771599948406,0.000655525072943,-0.161647468805313) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.730809688568115,-0.096795976161957,-0.051289565861225,0.248375087976456) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.044954504817724,0.069621212780476,-0.005129504483193,-0.020148638635874);
res += mat4(0.082564994692802,-0.206165030598640,0.127291470766068,0.099588558077812,0.024078655987978,-0.017609633505344,-0.032044019550085,-0.123295567929745,0.071482121944427,0.073123961687088,-0.273878961801529,-0.213525578379631,-0.058523904532194,-0.119991548359394,0.259248524904251,0.196799442172050) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.019281730055809,-0.038174819201231,-0.132554113864899,-0.022074254229665,-0.261057972908020,0.017081927508116,-0.249252140522003,-0.235179051756859,-0.002484199358150,-0.306678831577301,0.183701500296593,0.092067584395409,0.211726382374763,0.303957343101501,0.011251216754317,-0.022582031786442) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.098067268729210,0.004395511932671,0.074078068137169,0.131707385182381,0.209120184183121,-0.213125497102737,0.303456574678421,0.205625906586647,0.128583431243896,0.083084344863892,0.198027938604355,0.125524848699570,0.030343284830451,-0.047154061496258,-0.150637179613113,-0.024738525971770) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.280858218669891,0.072997517883778,0.222605943679810,-0.172160685062408,-0.045047447085381,0.028224870562553,0.112965315580368,0.079883486032486,-0.057978775352240,-0.318992614746094,-0.029159856960177,0.006055496167392,-0.154843956232071,0.024540200829506,-0.099597804248333,-0.189338684082031) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.078445859253407,0.126144379377365,-0.142117053270340,-0.251960992813110,0.283126473426819,0.191401347517967,-0.058871187269688,0.030991358682513,0.329098999500275,0.486528128385544,0.008521141484380,0.119324803352356,-0.422424376010895,-0.200049638748169,-0.333833515644073,-0.410363405942917) * MODEL1_texOff(vec2(0,0));
res += mat4(0.147957593202591,-0.049152001738548,0.063533753156662,0.197294503450394,0.066902853548527,-0.228009074926376,-0.186815902590752,-0.179900437593460,0.012668991461396,0.035939257591963,0.151477396488190,0.312719672918320,-0.068994387984276,0.021874006837606,0.234780654311180,0.192269742488861) * MODEL1_texOff(vec2(0,1));
res += mat4(0.181362047791481,-0.170235559344292,-0.164129048585892,-0.208198696374893,-0.070755094289780,0.034891460090876,-0.018260182812810,0.021229444071651,-0.123307242989540,0.208247929811478,0.303195953369141,0.394031643867493,-0.014593490399420,-0.009201268665493,0.061528719961643,-0.089230544865131) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.079716235399246,0.023590231314301,0.175394490361214,0.037391591817141,0.090765170753002,-0.146037206053734,0.007563563063741,0.045389793813229,-0.230887383222580,-0.645343244075775,-0.369249433279037,-0.290576577186584,0.193763405084610,-0.063094735145569,0.043307851999998,-0.187334358692169) * MODEL1_texOff(vec2(1,0));
res += mat4(0.125690504908562,-0.066453367471695,0.065075799822807,0.043904703110456,0.055574767291546,-0.112287640571594,-0.017545284703374,0.083248302340508,0.076760336756706,-0.019562829285860,-0.259557634592056,-0.246366843581200,0.240070536732674,0.026598898693919,0.244059532880783,0.172114402055740) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.251074939966202,0.394061863422394,-0.083529472351074,-0.068185836076736,0.049409177154303,-0.233585834503174,-0.343885332345963,-0.345791250467300,0.183648183941841,-0.099601902067661,0.110417254269123,-0.232819572091103,-0.107298955321312,-0.141680300235748,-0.018556861206889,-0.123463429510593) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.251989930868149,0.245957732200623,0.054145958274603,-0.183430880308151,0.077233903110027,-0.257030665874481,-0.254703104496002,0.141164019703865,0.158774733543396,0.012615811079741,0.040284331887960,-0.032419729977846,-0.125089004635811,-0.446273207664490,-0.117592841386795,0.020056614652276) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.331886023283005,0.195338115096092,-0.020709265023470,0.174932122230530,-0.159306481480598,-0.010287871584296,0.028948770835996,0.286479681730270,0.276236265897751,-0.042595360428095,0.029204469174147,-0.192781597375870,-0.111503705382347,-0.136325836181641,0.058648452162743,-0.033871471881866) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.075724028050900,0.210499331355095,0.099285177886486,-0.106979317963123,0.298934072256088,-0.212039709091187,0.240794807672501,0.433010220527649,0.126187562942505,-0.163887754082680,0.028259145095944,-0.171176865696907,-0.145835980772972,-0.019997742027044,0.048771638423204,-0.001451098243706) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.190716549754143,0.218933567404747,0.031704742461443,0.104536227881908,-0.095037929713726,0.390268296003342,0.369335234165192,0.195389688014984,0.204588457942009,-0.111413791775703,0.152852907776833,0.061181407421827,-0.204726904630661,-0.134678885340691,-0.268252611160278,-0.272469341754913) * MODEL2_texOff(vec2(0,0));
res += mat4(0.000524502596818,-0.011197519488633,0.174836203455925,0.210930079221725,-0.480029225349426,-0.256376445293427,-0.285557955503464,-0.628166377544403,0.358022212982178,-0.126631334424019,0.146365642547607,-0.079302422702312,-0.344905853271484,-0.144265532493591,0.136093661189079,-0.023292697966099) * MODEL2_texOff(vec2(0,1));
res += mat4(0.060303445905447,-0.009666074998677,0.015324743464589,0.034993086010218,-0.172573894262314,0.046204272657633,0.079531103372574,0.216810226440430,0.000263971567620,-0.101500689983368,0.043294012546539,-0.149964556097984,0.178195044398308,0.295176535844803,-0.049168426543474,0.116531528532505) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.046412527561188,0.114542663097382,0.115003228187561,0.200730547308922,0.091986425220966,0.167119055986404,0.029649533331394,-0.250455856323242,0.063130863010883,0.002902295673266,0.077619396150112,-0.093926914036274,0.244546189904213,-0.077741995453835,-0.027163134887815,-0.015896270051599) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.013015147298574,0.097407616674900,0.004837578628212,-0.013453968800604,-0.181662917137146,0.264643430709839,-0.079217761754990,-0.108097285032272,0.164515301585197,-0.050383422523737,0.155745550990105,-0.101338051259518,-0.175086423754692,-0.050528373569250,0.032932404428720,-0.059062995016575) * MODEL2_texOff(vec2(1,1));
res += mat4(0.049642141908407,-0.034056726843119,0.047234084457159,0.022391326725483,-0.216765865683556,0.166931718587875,-0.019354969263077,0.013490725308657,-0.030193436890841,-0.117967702448368,-0.128258213400841,-0.160099446773529,0.048644650727510,-0.039463382214308,-0.007747170049697,-0.042154047638178) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.009269130416214,0.185832485556602,0.090131990611553,-0.109778031706810,-0.045774057507515,-0.185901448130608,0.027294412255287,0.094489753246307,-0.163164690136909,-0.374613404273987,0.153147399425507,0.260857969522476,0.135101944208145,-0.126605153083801,-0.284534245729446,0.222553372383118) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.020613895729184,0.403759062290192,0.095059141516685,-0.009140331298113,0.232879444956779,-0.132297098636627,-0.135490864515305,-0.055148620158434,0.135824427008629,-0.416372030973434,0.375500231981277,0.099376812577248,-0.067673809826374,0.175640672445297,-0.134007245302200,-0.085472412407398) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.011003556661308,-0.063978493213654,-0.010137636214495,-0.113010160624981,-0.005492706783116,0.257703840732574,-0.144797384738922,0.377152234315872,0.028695859014988,-0.054218128323555,0.055067867040634,0.082860186696053,0.131112292408943,-0.008430136367679,-0.254971086978912,0.397921800613403) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.154531568288803,0.027870755642653,-0.149883061647415,-0.038891457021236,-0.207372650504112,0.309443950653076,0.170431300997734,0.305561095476151,0.182602033019066,0.344945728778839,0.266498982906342,-0.196301728487015,-0.242495864629745,-0.252476930618286,0.109851516783237,-0.336524277925491) * MODEL3_texOff(vec2(0,0));
res += mat4(0.199297323822975,0.163289487361908,-0.243239998817444,0.118253491818905,-0.075741901993752,0.159939199686050,0.146718516945839,0.309378445148468,-0.058030307292938,-0.092499434947968,-0.315815389156342,-0.207282200455666,-0.068553410470486,0.138406455516815,-0.025115286931396,0.129466891288757) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.010757402516901,-0.041179351508617,0.008400309830904,0.019914008677006,-0.218791469931602,0.096905328333378,-0.141238465905190,0.220387935638428,0.004590646829456,0.093021579086781,0.005114726256579,0.119521252810955,-0.302209228277206,-0.100736238062382,-0.325659304857254,0.015056919306517) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.042235419154167,0.001477667130530,0.105187840759754,0.064874559640884,-0.053397446870804,0.067803278565407,0.072110101580620,0.364272356033325,-0.099403508007526,0.035533100366592,-0.128615036606789,-0.155930921435356,-0.230180591344833,-0.306874334812164,-0.065779738128185,0.229816332459450) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.191714242100716,0.160897523164749,0.060872644186020,0.027800377458334,-0.159463897347450,0.131775707006454,-0.205085918307304,0.094891190528870,-0.071270525455475,-0.168212518095970,0.094667561352253,0.047253761440516,-0.030185958370566,-0.047239616513252,-0.042257886379957,-0.192042633891106) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.922836601734161,0.902250468730927,-0.817693889141083,-0.255957782268524) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL6
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 2_3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.180856928229332,0.252451777458191,0.051950760185719,0.131304785609245);
res += mat4(0.048709899187088,0.013747762888670,-0.009840060025454,-0.060768656432629,0.161507770419121,-0.205442205071449,0.018261944875121,-0.018965484574437,0.309983015060425,0.108877472579479,-0.034923881292343,-0.015581241808832,0.193892017006874,-0.017689950764179,-0.113229192793369,-0.016420474275947) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.316315263509750,-0.268814086914063,0.077200986444950,-0.084905661642551,-0.058147203177214,-0.010908946394920,-0.408409982919693,0.179823145270348,-0.202041685581207,-0.133488774299622,0.131735026836395,-0.001316715381108,-0.101154513657093,0.165297865867615,0.224538609385490,0.303195685148239) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.176875099539757,-0.044494122266769,0.105480492115021,-0.181573465466499,0.014287776313722,-0.048137988895178,0.118321381509304,0.102118067443371,-0.018056448549032,0.023105729371309,-0.047596763819456,-0.058520603924990,0.045215707272291,0.042642202228308,-0.028242986649275,-0.349102914333344) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.037609297782183,-0.000415882037487,0.142742171883583,-0.139925613999367,-0.270276755094528,0.275898545980453,0.020533559843898,0.080783918499947,0.213316828012466,0.054661985486746,0.102837875485420,0.248916596174240,0.006436078343540,-0.246051222085953,0.140196859836578,0.009385132230818) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.133523404598236,0.555921435356140,-0.137030839920044,-0.226945042610168,-0.048557709902525,0.058461282402277,0.034192647784948,-0.048750448971987,-0.180263042449951,0.575440466403961,-0.328508228063583,-0.301380187273026,-0.107985630631447,-0.659880995750427,-0.049679011106491,0.502214670181274) * MODEL1_texOff(vec2(0,0));
res += mat4(0.286208808422089,0.010290926322341,0.045899853110313,0.103627011179924,0.108180254697800,0.094806924462318,0.293278664350510,0.509106218814850,-0.043861843645573,0.044141523540020,0.338266879320145,0.452886372804642,0.102406464517117,0.006498947273940,-0.141673609614372,-0.587871849536896) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.016842149198055,0.075716093182564,0.125420883297920,0.117612339556217,0.132517427206039,0.236864238977432,-0.033706951886415,0.024978013709188,-0.377951055765152,-0.196090251207352,-0.027878636494279,0.085712753236294,0.170526787638664,0.121258154511452,0.017348052933812,0.039702799171209) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.076227642595768,-0.019777936860919,0.115382023155689,-0.123018570244312,0.099560499191284,-0.011890040710568,0.021980583667755,-0.157308369874954,-0.087541975080967,-0.228508576750755,0.212083712220192,0.075077280402184,0.102477304637432,0.100010916590691,-0.482623875141144,0.117135584354401) * MODEL1_texOff(vec2(1,0));
res += mat4(0.057974688708782,0.036688841879368,0.043558381497860,-0.098953858017921,-0.194020017981529,0.092295698821545,-0.226409986615181,0.113071158528328,0.069695226848125,-0.095950648188591,-0.291468322277069,-0.177161961793900,0.105266667902470,-0.129585832357407,0.160132572054863,-0.079264782369137) * MODEL1_texOff(vec2(1,1));
res += mat4(0.062445327639580,0.250338494777679,0.055474072694778,0.002020641462877,0.085873454809189,-0.029008584097028,-0.045503612607718,0.152640238404274,-0.312405258417130,0.273180931806564,-0.183461040258408,0.049057129770517,0.224936455488205,0.179447174072266,-0.059492200613022,0.172054231166840) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.074796840548515,0.248853668570518,-0.024651704356074,0.072895027697086,0.257289350032806,-0.118389144539833,0.015370449982584,0.115611299872398,-0.349925905466080,-0.260836780071259,-0.138341873884201,0.156302049756050,-0.124171957373619,-0.245628938078880,0.207651391625404,-0.025627836585045) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.016010971739888,0.093740321695805,-0.111360296607018,-0.161286145448685,0.137896418571472,-0.093237854540348,0.041655112057924,0.076123476028442,0.058938898146152,0.048412654548883,-0.153819069266319,0.180532217025757,-0.210398510098457,0.012794031761587,-0.187865987420082,-0.286798566579819) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.016598654910922,0.282150089740753,-0.224368646740913,0.119782999157906,0.228995159268379,-0.176510959863663,0.226471468806267,-0.113145649433136,-0.274192869663239,0.052592676132917,-0.218333318829536,0.019780188798904,-0.021492408588529,0.091789506375790,-0.018361628055573,0.261754900217056) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.358801394701004,0.263990581035614,-0.352366238832474,-0.271869689226151,0.104686684906483,-0.000813329941593,0.030953131616116,0.015297563746572,-0.501269578933716,0.037318013608456,-0.322875291109085,0.070982120931149,-0.282646238803864,0.235603749752045,-0.088686533272266,-0.587116658687592) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.294987022876740,0.218817666172981,0.167816370725632,0.217514425516129,-0.042405504733324,-0.026544058695436,-0.192993178963661,0.075449764728546,-0.107799530029297,0.100660607218742,-0.069242268800735,0.104422293603420,0.097662374377251,-0.042944598942995,-0.152971744537354,-0.025744576007128) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.279938489198685,-0.070410184562206,0.036305982619524,0.210765898227692,-0.129130840301514,-0.042586266994476,0.126934975385666,-0.040651697665453,-0.146755173802376,0.005745051894337,-0.106905840337276,0.017988948151469,-0.077949270606041,0.082541979849339,-0.270708888769150,0.095567882061005) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.174923628568649,-0.147486314177513,0.212666571140289,-0.072060503065586,-0.282687634229660,-0.058969199657440,-0.148238539695740,0.100813470780849,-0.329702794551849,-0.009955115616322,-0.182533949613571,0.049167644232512,0.076045818626881,-0.308564215898514,0.209958434104919,0.051813993602991) * MODEL2_texOff(vec2(1,0));
res += mat4(0.040815792977810,0.157694548368454,-0.008241379633546,-0.252760946750641,0.010012956336141,0.103160135447979,0.341877073049545,0.162276610732079,-0.151042252779007,-0.034131892025471,-0.238483980298042,0.032768882811069,-0.017412750050426,-0.266101121902466,-0.036915082484484,-0.164673328399658) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.028543461114168,-0.209155887365341,-0.088710039854050,0.025606624782085,0.013069888576865,-0.069247208535671,-0.359246850013733,-0.059006556868553,-0.061176162213087,0.335224866867065,-0.019862929359078,0.029694477096200,0.124900095164776,-0.040167398750782,0.129131436347961,-0.000500887457747) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.096500627696514,-0.104124568402767,-0.023853484541178,-0.035305578261614,-0.132065042853355,0.097793065011501,0.104836575686932,-0.113108448684216,-0.078893013298512,-0.171277672052383,0.111734561622143,0.280180692672729,0.068031772971153,-0.073485977947712,0.150023162364960,0.013768803328276) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.040317926555872,-0.041782826185226,-0.011227131821215,0.089280359447002,-0.013058488257229,-0.004708054009825,0.165301322937012,-0.025870870798826,0.042967636138201,0.092846222221851,0.167275428771973,0.146563261747360,0.154802322387695,-0.061596229672432,0.062454290688038,-0.102601483464241) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.042101833969355,-0.738129734992981,-0.200947463512421,-0.034406498074532,0.127255871891975,-0.093206346035004,0.297128349542618,-0.165830224752426,-0.079854354262352,-0.373979985713959,-0.196203306317329,-0.053243197500706,0.024624926969409,0.021498542279005,0.177117422223091,0.016782915219665) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.088929116725922,-0.481659054756165,0.130973532795906,0.137526720762253,0.138299599289894,-0.146176010370255,-0.177399992942810,-0.351169258356094,-0.016854526475072,-0.232946246862411,-0.512204468250275,-0.122487083077431,0.348406404256821,-0.296510159969330,0.003344964934513,0.023659305647016) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.061493735760450,-0.076064400374889,0.020686283707619,-0.098635748028755,0.031851682811975,-0.040587250143290,-0.083517841994762,-0.185140475630760,-0.083367213606834,0.072540715336800,0.026204515248537,0.159295216202736,0.054280515760183,0.038815427571535,0.252384871244431,-0.054871827363968) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.489638149738312,-0.077973805367947,0.106063060462475,0.064383342862129,-0.249019205570221,-0.071446508169174,0.180608287453651,0.022554537281394,0.470571279525757,0.197092622518539,-0.017068797722459,-0.180990457534790,0.106874942779541,0.039078943431377,0.061525985598564,-0.042898114770651) * MODEL3_texOff(vec2(1,-1));
res += mat4(-1.189757347106934,0.073676250874996,0.255046010017395,0.024116968736053,0.040598101913929,-0.097032584249973,-0.134083211421967,0.009081918746233,0.042943164706230,0.145762652158737,-0.270425528287888,0.270257741212845,-0.003708973759785,-0.070030666887760,0.264325469732285,-0.014634300023317) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.378507524728775,0.002545485273004,-0.188532739877701,-0.357548207044601,-0.070680260658264,-0.006764668971300,-0.027169434353709,-0.092065699398518,0.347674071788788,0.098253130912781,0.444533556699753,0.294353544712067,0.243160486221313,0.052317589521408,-0.015088153071702,0.200302988290787) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.028715301305056,-0.105430640280247,-0.315348029136658,-0.128129944205284) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.296511501073837,-0.107781969010830,-0.051288090646267,0.107230372726917);
res += mat4(-0.094969630241394,-0.254010796546936,0.048685535788536,-0.081157192587852,0.533465921878815,0.427872151136398,0.160512745380402,-0.100223764777184,-0.305020511150360,-0.006482058204710,-0.044598735868931,0.028616486117244,0.021642129868269,-0.223378747701645,0.120170861482620,-0.126442953944206) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.139738738536835,0.470363408327103,-0.015705920755863,0.017416864633560,0.635423123836517,-0.432646423578262,-0.224276155233383,0.102871097624302,0.039442036300898,0.218967124819756,0.146174415946007,-0.116757631301880,-0.100298270583153,-0.040600929409266,-0.004563937429339,-0.124584831297398) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.043398465961218,-0.208685532212257,0.081714376807213,-0.032870367169380,-0.001514813862741,0.029725098982453,-0.313153028488159,0.287331908941269,0.001449159928598,-0.037285439670086,0.283818960189819,0.082013025879860,0.040613137185574,0.182039767503738,-0.283529520034790,0.016693970188498) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.078400403261185,-0.403971940279007,-0.632921516895294,0.295869678258896,0.144626230001450,0.026831969618797,0.310281693935394,-0.122280478477478,0.382437348365784,-0.032132253050804,0.140866056084633,-0.326957494020462,-0.010920422151685,-0.054136402904987,-0.166827321052551,0.047334026545286) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.041878178715706,0.371768385171890,-0.295061498880386,-0.127128094434738,-0.120405375957489,-0.058480810374022,-0.378506660461426,0.000985435442999,0.102168820798397,-0.198358491063118,-0.295206218957901,0.344279378652573,0.316919028759003,-0.174400061368942,0.139375194907188,-0.448687285184860) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.063325800001621,-0.387885212898254,0.347878158092499,-0.052547782659531,-0.004392825067043,0.164269432425499,-0.218798950314522,-0.104219034314156,-0.067708648741245,-0.126125231385231,-0.122361503541470,0.058313496410847,-0.024361276999116,-0.248353555798531,0.189183294773102,-0.301784604787827) * MODEL1_texOff(vec2(0,1));
res += mat4(0.009656642563641,0.200209885835648,-0.281239867210388,-0.294598788022995,0.212703451514244,0.118738822638988,-0.086149320006371,0.039470784366131,-0.006969693116844,-0.060025621205568,0.092794485390186,0.241571694612503,-0.012179111130536,-0.046227473765612,-0.125919818878174,0.259565770626068) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.045793920755386,-0.055472623556852,-0.218523755669594,-0.075819641351700,0.008884080685675,-0.064631037414074,0.002866083523259,0.013521889224648,0.098102383315563,-0.015515014529228,-0.194526627659798,-0.224611446261406,-0.078585289418697,0.111057117581367,0.517703056335449,0.336439341306686) * MODEL1_texOff(vec2(1,0));
res += mat4(0.064340651035309,-0.161478474736214,0.262949705123901,0.022885398939252,0.017989192157984,0.002322106389329,-0.113960191607475,-0.066248342394829,0.050583850592375,0.122690983116627,-0.296983748674393,-0.118865378201008,0.032137546688318,-0.024685898795724,0.594190597534180,0.199485868215561) * MODEL1_texOff(vec2(1,1));
res += mat4(0.516708254814148,0.124340660870075,0.216005429625511,-0.037772223353386,-0.153575867414474,-0.112854473292828,-0.171050995588303,0.003201471408829,-0.774679481983185,-0.163862198591232,-0.058942086994648,-0.015353666618466,-0.040301386266947,0.293639481067657,0.328279078006744,-0.192192852497101) * MODEL2_texOff(vec2(-1,-1));
res += mat4(0.596002995967865,-0.309830576181412,-0.061781585216522,0.012828521430492,-0.180312409996986,-0.179997488856316,-0.208243012428284,-0.230371236801147,-0.508975446224213,0.141243413090706,0.045476876199245,-0.080586679279804,0.191270276904106,0.276081144809723,0.248501285910606,-0.144158437848091) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.201795980334282,0.026211719959974,0.135522931814194,-0.164241075515747,0.029101066291332,0.070413686335087,-0.086349606513977,-0.126787394285202,-0.156435534358025,0.101472921669483,-0.102864928543568,-0.021686727181077,-0.048599343746901,0.184924289584160,0.180799424648285,0.055985074490309) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.127185478806496,0.221247702836990,0.162831917405128,-0.140240684151649,0.344922989606857,-0.002550730016083,-0.073707692325115,-0.043619684875011,-0.419547647237778,0.077362835407257,-0.029229413717985,0.056906826794147,-0.080785118043423,-0.343563407659531,-0.108334362506866,0.024125702679157) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.201031997799873,0.209715276956558,-0.137418925762177,0.011133156716824,-0.217793688178062,-0.261959761381149,0.053272154182196,-0.045917671173811,-0.593312740325928,-0.039514135569334,0.156464517116547,-0.177140191197395,0.288747966289520,0.087411567568779,-0.223852917551994,0.235281258821487) * MODEL2_texOff(vec2(0,0));
res += mat4(0.032280500978231,-0.131928741931915,0.339364618062973,0.013948826119304,0.058547236025333,0.333842635154724,-0.016512101516128,-0.001431424752809,-0.168658062815666,-0.058880466967821,0.077680058777332,-0.022096714004874,-0.015354908071458,0.183151468634605,0.162190526723862,0.035633292049170) * MODEL2_texOff(vec2(0,1));
res += mat4(0.050998937338591,-0.128629937767982,0.224941119551659,-0.020547794178128,-0.024508377537131,-0.007722402922809,0.117678321897984,0.092645272612572,-0.258128464221954,0.040274821221828,-0.016269123181701,-0.136568203568459,0.042750649154186,0.046263232827187,-0.305875778198242,0.291425704956055) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.147321298718452,-0.282074689865112,0.196592018008232,0.001811616239138,-0.173437178134918,0.155575677752495,0.089240342378616,0.145240336656570,-0.155155315995216,0.107037842273712,-0.163953840732574,-0.094802930951118,0.212292835116386,0.065304346382618,-0.409065604209900,0.311359852552414) * MODEL2_texOff(vec2(1,0));
res += mat4(0.142568424344063,-0.150611042976379,0.163811653852463,-0.027745265513659,-0.028563950210810,0.006114686839283,0.048559721559286,0.124393746256828,-0.109336115419865,-0.018730882555246,-0.074022553861141,-0.101834192872047,0.047264162451029,0.106314264237881,0.116077400743961,0.101532071828842) * MODEL2_texOff(vec2(1,1));
res += mat4(0.035222914069891,-0.063929192721844,-0.044472612440586,0.006526654586196,0.186086311936378,0.194012567400932,-0.005649093538523,0.145325839519501,0.306853860616684,-0.139200419187546,-0.094416163861752,-0.112339533865452,0.097017273306847,0.308827579021454,-0.127316012978554,0.202290982007980) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.299235045909882,-0.219750285148621,-0.000972695765086,0.019607266411185,0.279399305582047,-0.243048921227455,-0.039891328662634,-0.004977980628610,-0.085910744965076,-0.071919187903404,-0.060211043804884,-0.210694506764412,0.103420056402683,-0.081774622201920,-0.253411233425140,0.035089887678623) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.009973043575883,-0.092214576900005,0.104561239480972,0.087892375886440,-0.308140814304352,0.056077662855387,-0.089624091982841,0.059432718902826,-0.000683873426169,0.394349336624146,0.088694609701633,-0.146628379821777,-0.064467236399651,0.123874299228191,-0.129320934414864,0.088733911514282) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.137529343366623,0.005892449058592,0.008062226697803,-0.009146142750978,0.275942444801331,0.036935418844223,-0.068604215979576,0.097831793129444,0.090660363435745,-0.131534039974213,-0.088626064360142,0.074086777865887,0.068904764950275,0.336069971323013,-0.069919019937515,-0.085619360208511) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.571081042289734,0.251523792743683,-0.039895545691252,0.040905315428972,-0.282477706670761,-0.357639968395233,0.102134749293327,0.186249777674675,0.008316342718899,0.101630143821239,0.088807485997677,0.512572467327118,0.109399013221264,-0.473900407552719,0.238992765545845,0.012896509841084) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.294507980346680,0.211205855011940,0.214436411857605,-0.042539849877357,-0.081272274255753,0.365067660808563,-0.033621910959482,0.171752244234085,-0.092398539185524,0.088754698634148,0.060925628989935,0.169685795903206,0.341382056474686,-0.077405869960785,0.295416176319122,-0.126801103353500) * MODEL3_texOff(vec2(0,1));
res += mat4(0.056870684027672,-0.075443014502525,0.018551884219050,0.016454765573144,-0.469163417816162,0.186971843242645,-0.069606095552444,0.033863961696625,-0.026222534477711,0.134109824895859,-0.015332558192313,-0.072350017726421,-0.001364066265523,0.099615387618542,-0.341396391391754,-0.189858347177505) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.036644652485847,-0.264394223690033,0.028094798326492,-0.071244627237320,-0.061521518975496,0.214139506220818,0.216894432902336,0.183173537254333,-0.081418149173260,0.222014009952545,-0.028212010860443,-0.153657183051109,0.013384361751378,-0.010493085719645,0.002354439347982,-0.283778786659241) * MODEL3_texOff(vec2(1,0));
res += mat4(0.088562808930874,-0.000071023197961,0.159681379795074,-0.056478466838598,0.270860642194748,0.325236529111862,0.080550998449326,-0.009366912767291,-0.070948235690594,0.057010613381863,0.276409655809402,-0.010794683359563,0.176842778921127,-0.036811929196119,-0.014935707673430,-0.049041606485844) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.012589212507010,0.614138841629028,-0.649945318698883,-0.320386826992035) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE MODEL1
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 3_1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.060175184160471,0.020574480295181,0.082105688750744,0.076663352549076);
res += mat4(-0.102855630218983,-0.111344106495380,-0.077184058725834,0.058219503611326,-0.119461998343468,0.006326353177428,-0.277298271656036,-0.004933342803270,0.164579436182976,-0.012092496268451,0.016314752399921,-0.071096308529377,-0.043890736997128,-0.106894582509995,0.002599078230560,-0.059754740446806) * MODEL4_texOff(vec2(-1,-1));
res += mat4(0.047300867736340,0.307097673416138,-0.001070980681106,-0.044298883527517,0.200527042150497,0.384792685508728,-0.248821884393692,0.005631043575704,0.094627439975739,-0.239883482456207,0.134181484580040,-0.004493420012295,0.180769056081772,-0.190952241420746,-0.157856464385986,-0.123254589736462) * MODEL4_texOff(vec2(-1,0));
res += mat4(0.038779001682997,0.025149550288916,-0.039787955582142,-0.071400873363018,0.005971274804324,0.191633537411690,-0.113376811146736,0.065289691090584,0.046366315335035,-0.184386476874352,0.131553471088409,0.012352535501122,0.010204185731709,0.124407954514027,0.237183108925819,0.023414937779307) * MODEL4_texOff(vec2(-1,1));
res += mat4(-0.087807424366474,0.062607809901237,0.009929706342518,0.536927402019501,-0.117108963429928,-0.214391574263573,-0.087889544665813,-0.273193925619125,0.412481158971786,-0.245274186134338,0.531125366687775,0.162460759282112,-0.293728172779083,0.053343921899796,-0.059854626655579,-0.086704485118389) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.219854816794395,0.728764533996582,-0.186468228697777,-0.443647533655167,-0.055295858532190,-0.103352285921574,-0.228683471679688,-0.104392528533936,-0.656345844268799,0.778221428394318,-0.565242350101471,0.000035263390600,0.288725763559341,-0.250844210386276,-0.036455739289522,0.055580258369446) * MODEL4_texOff(vec2(0,0));
res += mat4(0.225879997014999,-0.158708781003952,-0.017264427617192,0.239432707428932,0.199392303824425,0.147327721118927,-0.081392705440521,0.011098057962954,0.259499520063400,-0.120439641177654,0.194703251123428,0.004405896179378,-0.295723944902420,0.387745767831802,0.051374223083258,-0.072923235595226) * MODEL4_texOff(vec2(0,1));
res += mat4(-0.002126810839400,0.021504841744900,0.049014247953892,-0.071551635861397,-0.277957379817963,-0.159280955791473,-0.187079772353172,0.088468752801418,-0.022172193974257,-0.054274696856737,0.117668226361275,0.102741539478302,-0.076731666922569,-0.172659948468208,-0.001201328588650,-0.125940173864365) * MODEL4_texOff(vec2(1,-1));
res += mat4(-0.058667004108429,-0.031287718564272,-0.057654891163111,-0.023151015862823,0.115398325026035,0.013298876583576,-0.202844455838203,-0.246457010507584,0.005036583170295,-0.398430168628693,-0.231019094586372,-0.079503536224365,0.260080963373184,-0.044959310442209,0.209422096610069,0.129408612847328) * MODEL4_texOff(vec2(1,0));
res += mat4(0.038328692317009,0.144110396504402,0.120760403573513,-0.064499802887440,0.165212109684944,0.448299527168274,-0.007969099096954,0.023095127195120,-0.000272147561191,0.123257495462894,0.028999598696828,0.045508887618780,-0.204863205552101,-0.013172507286072,-0.303972691297531,0.092823632061481) * MODEL4_texOff(vec2(1,1));
res += mat4(0.010535669513047,-0.019511424005032,-0.024056782945991,0.022958943620324,0.010099603794515,0.141724988818169,0.001943950657733,-0.065676897764206,0.074861608445644,0.084421932697296,-0.209556996822357,0.094730861485004,-0.032596208155155,0.112386062741280,-0.388254076242447,-0.182444617152214) * MODEL5_texOff(vec2(-1,-1));
res += mat4(0.002520446898416,-0.131054535508156,0.119319699704647,-0.011543664149940,-0.055905893445015,-0.033003624528646,-0.295073986053467,0.056478075683117,-0.017150452360511,0.203530684113503,0.047730311751366,-0.195622935891151,0.034781802445650,-0.135097891092300,0.371999859809875,-0.388923138380051) * MODEL5_texOff(vec2(-1,0));
res += mat4(-0.027663515880704,0.028924072161317,-0.054621513932943,-0.014960619620979,-0.208343327045441,-0.010175243020058,-0.052805095911026,-0.128187745809555,-0.017178127542138,-0.068631693720818,-0.086141608655453,0.005603703670204,-0.102070175111294,-0.116654232144356,-0.236235082149506,-0.147138252854347) * MODEL5_texOff(vec2(-1,1));
res += mat4(-0.670074045658112,0.078327514231205,0.042670216411352,-0.221958816051483,0.109540387988091,0.183604925870895,-0.311760574579239,-0.360035121440887,0.374608993530273,-0.036746568977833,0.120634980499744,0.115990340709686,-0.027130266651511,0.172096163034439,-0.262984335422516,-0.242174357175827) * MODEL5_texOff(vec2(0,-1));
res += mat4(0.286840528249741,0.385473489761353,-0.277151316404343,-0.117480628192425,-0.077460825443268,-0.020379129797220,0.386366426944733,0.031082937493920,-0.057442914694548,-0.007854645140469,-0.169343262910843,0.056866146624088,-0.411919772624969,0.173544853925705,-0.038798496127129,0.416556775569916) * MODEL5_texOff(vec2(0,0));
res += mat4(0.120848849415779,-0.208897024393082,0.038938283920288,0.054209500551224,0.111415080726147,-0.050005856901407,0.011456075124443,-0.127517983317375,-0.138788968324661,-0.418535470962524,-0.209390252828598,0.064322099089622,0.288430780172348,-0.626773834228516,-0.245134308934212,0.101227685809135) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.016933444887400,-0.069052025675774,0.014310945756733,0.046664834022522,0.020363917574286,0.051944907754660,-0.032557670027018,-0.118396110832691,0.136412024497986,0.164220452308655,0.024110596626997,0.080397285521030,-0.063647620379925,-0.013515342026949,-0.015542491339147,0.144996568560600) * MODEL5_texOff(vec2(1,-1));
res += mat4(-0.157600283622742,-0.325776219367981,-0.007081610150635,-0.287503153085709,0.083366714417934,0.031970240175724,-0.016135331243277,0.152245014905930,-0.109711445868015,0.184304222464561,-0.074529364705086,0.028907006606460,0.265155196189880,-0.081046253442764,0.001208747155033,0.075915873050690) * MODEL5_texOff(vec2(1,0));
res += mat4(0.086401067674160,0.104737855494022,0.153481513261795,-0.012975263409317,-0.253318876028061,-0.041338525712490,-0.012113986536860,-0.063443548977375,0.002957149408758,0.005979690235108,-0.000399407785153,0.072869278490543,-0.009513737633824,-0.039623517543077,-0.115106530487537,-0.036776904016733) * MODEL5_texOff(vec2(1,1));
res += mat4(-0.088069029152393,0.042604491114616,0.127665445208549,0.019561594352126,-0.014468511566520,-0.026440568268299,0.048849254846573,0.023073680698872,0.373664855957031,-0.009861264377832,0.516128242015839,-0.002695735078305,-0.023995114490390,0.108238525688648,-0.300672382116318,0.045828592032194) * MODEL6_texOff(vec2(-1,-1));
res += mat4(-0.016064502298832,0.074743382632732,0.133719533681870,-0.053253274410963,-0.164246708154678,0.073721691966057,-0.010832136496902,0.289151638746262,-0.074037320911884,0.024283060804009,0.249670773744583,0.114489048719406,-0.036908343434334,-0.081197217106819,-0.154869452118874,0.042295612394810) * MODEL6_texOff(vec2(-1,0));
res += mat4(0.135902434587479,0.050157926976681,0.081576101481915,-0.036375202238560,-0.018148848786950,0.040880825370550,-0.207436978816986,0.070630401372910,0.108404286205769,-0.200515568256378,0.044269833713770,0.002018930157647,-0.093377210199833,-0.104826055467129,-0.063988544046879,0.000880652631167) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.335079640150070,-0.223118647933006,0.055472172796726,-0.281099647283554,0.110138319432735,0.072377368807793,-0.339967995882034,0.058348607271910,-0.153416439890862,-0.026777939870954,0.283415079116821,-0.174002811312675,0.576362133026123,-0.143890634179115,0.170806571841240,0.217972189188004) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.190543860197067,0.105419076979160,-0.016812127083540,-0.114734143018723,-0.306860834360123,-0.161107435822487,0.311834514141083,-0.217667594552040,-0.117483854293823,-0.165417775511742,0.176395028829575,0.084055937826633,-0.390474289655685,-0.316285610198975,0.453850835561752,0.150698572397232) * MODEL6_texOff(vec2(0,0));
res += mat4(0.006597163155675,0.018483387306333,0.042767357081175,-0.144731923937798,0.240848734974861,0.068305484950542,-0.084545917809010,-0.003061291528866,0.186227723956108,-0.377680987119675,0.245073020458221,0.004065158776939,-0.083491951227188,-0.076533921062946,-0.128707528114319,0.030260289087892) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.259248256683350,-0.263463765382767,-0.026631550863385,-0.138525098562241,-0.162695586681366,0.012246145866811,-0.106315083801746,-0.195209547877312,0.144124448299408,0.041713684797287,0.091693490743637,-0.053909618407488,0.396189570426941,-0.089619502425194,0.020350925624371,0.107617832720280) * MODEL6_texOff(vec2(1,-1));
res += mat4(0.122309632599354,0.104713886976242,0.305462509393692,-0.016426132991910,0.023252660408616,-0.201548457145691,0.111175708472729,0.066384822130203,-0.058503597974777,-0.130919903516769,0.261016130447388,-0.068847276270390,-0.096895553171635,-0.035422988235950,-0.259640187025070,-0.010729320347309) * MODEL6_texOff(vec2(1,0));
res += mat4(0.009413228370249,0.003694611368701,0.022809574380517,-0.075560085475445,-0.112839266657829,0.101335920393467,-0.076768927276134,-0.118103437125683,-0.040341772139072,-0.075950510799885,0.115888133645058,-0.048300426453352,0.015621392056346,-0.021759634837508,0.034475795924664,-0.002929195063189) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.083714708685875,0.577606856822968,-0.123558886349201,0.852417826652527) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.010919159278274,-0.011526569724083,-0.027906902134418,-0.151504427194595);
res += mat4(0.169683814048767,0.105563975870609,-0.281996786594391,-0.086293011903763,-0.031502179801464,0.042604397982359,-0.088222786784172,-0.068329304456711,-0.182955980300903,-0.034569662064314,-0.256179422140121,0.019434219226241,-0.220080375671387,0.076566472649574,0.056127201765776,0.052633792161942) * MODEL4_texOff(vec2(-1,-1));
res += mat4(-0.219217240810394,0.148693233728409,0.360716670751572,-0.159927845001221,0.097718507051468,0.011051782406867,0.016871608793736,-0.107213780283928,0.322934538125992,-0.089913316071033,-0.180501639842987,0.152667254209518,0.032934565097094,0.212922856211662,0.006312630604953,0.074006207287312) * MODEL4_texOff(vec2(-1,0));
res += mat4(0.078305475413799,0.046677827835083,-0.208697751164436,-0.117272287607193,-0.037528596818447,-0.018991861492395,-0.004349046386778,0.062891080975533,-0.085761874914169,0.027622777968645,0.538159489631653,-0.099590815603733,-0.091359563171864,-0.050843026489019,-0.158243238925934,0.137824147939682) * MODEL4_texOff(vec2(-1,1));
res += mat4(0.556088566780090,-0.077613040804863,-0.340264409780502,-0.004089686553925,-0.002256583189592,0.045535251498222,0.036040745675564,0.050191979855299,-0.495928913354874,0.099699407815933,-0.044214241206646,-0.036288041621447,-0.031923867762089,0.007586386520416,0.116404749453068,0.052927378565073) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.970596313476563,-0.223361581563950,0.202158197760582,-0.123133316636086,-0.087635263800621,0.073381252586842,0.081707589328289,-0.068619318306446,-0.322586238384247,-0.235155910253525,-0.363541573286057,-0.308656424283981,-0.170745342969894,-0.016877748072147,0.114731118083000,0.082173481583595) * MODEL4_texOff(vec2(0,0));
res += mat4(-0.245149314403534,-0.126833647489548,-0.241919949650764,-0.131453827023506,-0.045582525432110,-0.010078147985041,-0.099569313228130,0.006038094405085,0.543852210044861,0.017981434240937,0.457212239503860,0.160620599985123,-0.447880297899246,-0.354233354330063,-0.262732118368149,-0.354336708784103) * MODEL4_texOff(vec2(0,1));
res += mat4(0.146036118268967,-0.083852246403694,-0.169473856687546,0.067078612744808,-0.105954319238663,-0.020550537854433,0.014950421638787,-0.024722199887037,0.039534524083138,-0.009139226749539,-0.010942230932415,0.016190096735954,0.131534829735756,-0.056076187640429,-0.225034072995186,-0.247505322098732) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.151928111910820,0.014005687087774,0.141452595591545,-0.093721404671669,0.215337961912155,-0.066382631659508,0.075021564960480,-0.084261693060398,-0.494322627782822,0.069703690707684,-0.170675069093704,0.082007974386215,-0.179010719060898,0.155283644795418,0.070540457963943,0.145909607410431) * MODEL4_texOff(vec2(1,0));
res += mat4(-0.007368990685791,0.086090661585331,-0.112791158258915,-0.072446629405022,-0.063409157097340,-0.004421087913215,-0.169124647974968,-0.317432671785355,0.042577888816595,0.085351213812828,0.343235313892365,0.021114202216268,-0.242889329791069,-0.266693025827408,-0.155821934342384,-0.278220415115356) * MODEL4_texOff(vec2(1,1));
res += mat4(0.100944600999355,0.164365887641907,-0.013326401822269,-0.094171546399593,0.034508869051933,0.022690847516060,-0.049616672098637,0.158442795276642,-0.166630432009697,0.031993027776480,-0.100868165493011,0.096596665680408,-0.029808297753334,-0.077238313853741,0.266022056341171,0.093834862112999) * MODEL5_texOff(vec2(-1,-1));
res += mat4(-0.047783743590117,0.148767277598381,0.319664508104324,-0.105360463261604,0.027104716747999,0.060313127934933,-0.182678118348122,-0.055636867880821,0.029294004663825,0.113108672201633,0.243465483188629,0.049285743385553,-0.122902967035770,-0.179943203926086,-0.348387926816940,0.192831113934517) * MODEL5_texOff(vec2(-1,0));
res += mat4(0.027865789830685,-0.070449955761433,-0.211183190345764,0.095419451594353,-0.153257980942726,0.100823961198330,0.055760305374861,-0.120033517479897,-0.311741262674332,0.091726690530777,-0.289222687482834,-0.122572988271713,0.112245544791222,-0.087076619267464,-0.004603182431310,0.226445347070694) * MODEL5_texOff(vec2(-1,1));
res += mat4(0.148728847503662,0.046989075839520,-0.125678002834320,0.374596059322357,-0.253948003053665,0.135180711746216,0.202052965760231,0.451906710863113,-0.368360519409180,0.157382041215897,0.372937768697739,-0.083080999553204,0.434729546308517,-0.271062552928925,-0.410239160060883,0.288878917694092) * MODEL5_texOff(vec2(0,-1));
res += mat4(-0.133305951952934,-0.605188846588135,0.042805984616280,-0.037147279828787,0.135904803872108,-0.723945915699005,-0.263563990592957,0.155936121940613,0.027096567675471,-0.097570300102234,0.062696546316147,0.287171959877014,0.157821446657181,-0.062618754804134,-0.354421406984329,-0.052441351115704) * MODEL5_texOff(vec2(0,0));
res += mat4(-0.040868952870369,0.114247314631939,-0.065988689661026,-0.277688175439835,0.067210525274277,0.153260782361031,-0.056457161903381,0.054400704801083,-0.247270897030830,-0.095324851572514,-0.204789653420448,-0.102046817541122,0.079990357160568,-0.036424901336432,0.031805586069822,0.159122467041016) * MODEL5_texOff(vec2(0,1));
res += mat4(0.026772987097502,0.078401312232018,-0.070418432354927,0.226155519485474,-0.020496761426330,0.031476762145758,0.045872617512941,0.232684895396233,-0.062948912382126,-0.007000300101936,0.015112956985831,-0.045297916978598,-0.105792276561260,-0.039308313280344,0.108584977686405,0.091088682413101) * MODEL5_texOff(vec2(1,-1));
res += mat4(-0.071140162646770,-0.182100340723991,-0.042685672640800,-0.449004620313644,-0.008604210801423,0.171686679124832,0.219175711274147,0.020682157948613,0.129842787981033,0.041207708418369,-0.109314933419228,-0.087438777089119,-0.126857385039330,-0.090264804661274,0.017831128090620,0.039147697389126) * MODEL5_texOff(vec2(1,0));
res += mat4(0.149173840880394,0.132415875792503,0.246214523911476,-0.032308753579855,0.064862549304962,0.004755372181535,-0.123082719743252,0.101654432713985,-0.007382231764495,0.043728683143854,-0.002471243962646,0.096714176237583,-0.155559480190277,-0.083970852196217,-0.325372070074081,-0.204527318477631) * MODEL5_texOff(vec2(1,1));
res += mat4(0.174342304468155,-0.016607455909252,-0.333646744489670,-0.087561048567295,0.079885847866535,-0.022242417559028,-0.027450352907181,-0.030220316722989,-0.076840333640575,-0.179479628801346,-0.403878480195999,-0.151687026023865,-0.156187087297440,-0.028500471264124,0.015762498602271,-0.056004952639341) * MODEL6_texOff(vec2(-1,-1));
res += mat4(-0.211798444390297,-0.132071182131767,0.054208163172007,-0.245986595749855,0.019919198006392,-0.134566336870193,-0.171498268842697,-0.094444610178471,-0.226753666996956,-0.157170489430428,0.035367362201214,-0.017343319952488,0.443751573562622,0.010007534176111,-0.078368082642555,-0.060405276715755) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.297440975904465,-0.154134660959244,0.080927722156048,-0.206556439399719,-0.080493003129959,-0.037658542394638,-0.005638626404107,-0.044158741831779,0.074651576578617,-0.096574187278748,0.289549022912979,0.101230636239052,-0.388938724994659,0.071510538458824,0.149694815278053,-0.263847202062607) * MODEL6_texOff(vec2(-1,1));
res += mat4(0.313746005296707,-0.147514447569847,-0.334648966789246,-0.055993217974901,-0.104824528098106,-0.152613595128059,-0.021586343646049,-0.151586577296257,-0.227715700864792,0.016169391572475,-0.020532600581646,0.078717969357967,-0.270646810531616,-0.002512628911063,-0.157655969262123,0.016856689006090) * MODEL6_texOff(vec2(0,-1));
res += mat4(-0.272832453250885,-0.101928532123566,0.150201722979546,0.169673219323158,0.409036457538605,-0.199242040514946,0.010685698129237,0.112094283103943,-0.318704754114151,0.117134369909763,0.012710302136838,-0.145700052380562,-0.060903571546078,0.039597101509571,-0.008719068020582,-0.188089311122894) * MODEL6_texOff(vec2(0,0));
res += mat4(-0.392160296440125,0.022453626617789,0.111410610377789,-0.257586270570755,-0.349260866641998,0.197531342506409,-0.320170789957047,-0.319949120283127,0.160483017563820,0.037233579903841,0.034640215337276,0.074567452073097,0.183685973286629,-0.047933515161276,0.326789766550064,0.230934217572212) * MODEL6_texOff(vec2(0,1));
res += mat4(0.112616769969463,-0.030767438933253,-0.332499295473099,0.101031176745892,-0.204122677445412,-0.123426184058189,-0.094442829489708,0.099885217845440,0.068487480282784,0.051387228071690,0.045074220746756,-0.127064526081085,0.164703816175461,0.123421795666218,-0.024490611627698,-0.289624124765396) * MODEL6_texOff(vec2(1,-1));
res += mat4(-0.035310022532940,0.089614577591419,-0.037738777697086,-0.277016758918762,-0.081257417798042,-0.261509031057358,-0.232502281665802,0.024809846654534,-0.078116841614246,-0.049216542392969,0.006320867687464,-0.006731805391610,-0.237272277474403,0.166427165269852,0.091202780604362,-0.009634757414460) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.046074371784925,-0.030062695965171,0.170844048261642,0.410455167293549,0.048771537840366,0.022419620305300,0.075931668281555,-0.029557164758444,-0.009840524755418,-0.041725073009729,0.005263097584248,0.065062932670116,0.013892315328121,0.022302255034447,0.115426428616047,0.059027470648289) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.051398690789938,0.835185647010803,0.013312269002199,0.581789493560791) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE MODEL2
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 3_2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(0.177193298935890,-0.345084965229034,-0.191404968500137,-0.037344504147768);
res += mat4(0.169406101107597,-0.279718637466431,-0.162437647581100,-0.059352647513151,0.308785110712051,0.610390186309814,0.061595387756824,0.171680152416229,0.052003785967827,-0.223153248429298,0.057459384202957,0.197801932692528,-0.059062432497740,-0.122639983892441,-0.046495199203491,0.035988803952932) * MODEL4_texOff(vec2(-1,-1));
res += mat4(0.209226533770561,-0.104653015732765,-0.294384807348251,-0.155401632189751,0.264883965253830,0.053350608795881,0.022517051547766,0.164261102676392,-0.125844925642014,-0.418555200099945,-0.264548331499100,0.381905198097229,-0.054311219602823,-0.072175964713097,0.181142836809158,0.539319336414337) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.157258138060570,-0.178708940744400,-0.036322627216578,0.162967324256897,-0.050084963440895,-0.140435680747032,-0.195215061306953,0.127186357975006,0.098899751901627,0.056868370622396,0.303051680326462,0.179393559694290,-0.114811308681965,0.011508783325553,-0.197613820433617,0.007645076140761) * MODEL4_texOff(vec2(-1,1));
res += mat4(0.099648915231228,0.450376480817795,-0.172950744628906,-0.229748174548149,0.226962417364120,0.322044551372528,0.067844077944756,-0.303367584943771,0.048817213624716,0.043155033141375,0.127731367945671,-0.104406163096428,0.005438449326903,0.013309725560248,-0.100640788674355,-0.039010126143694) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.319853335618973,0.072563745081425,-0.331025630235672,-0.939811110496521,-0.040820159018040,-0.373580336570740,0.317756652832031,-0.148932605981827,0.234325081110001,0.261449247598648,0.122244656085968,-0.672602415084839,-0.017579529434443,-0.456500619649887,0.294773131608963,-0.280344128608704) * MODEL4_texOff(vec2(0,0));
res += mat4(0.020717630162835,0.162203013896942,0.098411291837692,0.016934072598815,-0.090464882552624,-0.233089491724968,-0.332137972116470,-0.026172790676355,-0.091719903051853,0.013402687385678,-0.085586749017239,0.110256008803844,-0.053374707698822,0.207802772521973,-0.097778812050819,-0.200388252735138) * MODEL4_texOff(vec2(0,1));
res += mat4(0.092233568429947,-0.075178243219852,-0.040941987186670,-0.010038925334811,-0.081111311912537,0.216528326272964,0.164174705743790,-0.253727555274963,-0.058714777231216,-0.010921177454293,0.128365069627762,-0.172779411077499,-0.197345286607742,-0.121266320347786,0.059005994349718,0.175584331154823) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.073437742888927,0.092140316963196,0.098221637308598,0.431986391544342,0.011238321661949,0.400260210037231,-0.019550245255232,-0.290048092603683,-0.024925522506237,-0.134210258722305,0.103250220417976,0.046251282095909,0.024729263037443,-0.010172687470913,0.010075695812702,-0.450109392404556) * MODEL4_texOff(vec2(1,0));
res += mat4(-0.007028983905911,0.007505926769227,-0.123696729540825,-0.085370153188705,-0.305902868509293,0.052559327334166,-0.240414097905159,-0.359512388706207,0.014397257938981,0.194340467453003,-0.085310190916061,-0.039189115166664,0.163602411746979,0.102143324911594,0.110285691916943,-0.145577967166901) * MODEL4_texOff(vec2(1,1));
res += mat4(0.032198894768953,-0.002899900777265,0.090596616268158,-0.050596989691257,-0.022668311372399,-0.216002747416496,-0.141401320695877,-0.002277586376294,-0.014162786304951,0.074427351355553,-0.053535334765911,-0.063136056065559,0.064538426697254,0.045481745153666,-0.078394919633865,-0.156633168458939) * MODEL5_texOff(vec2(-1,-1));
res += mat4(0.028989037498832,-0.087362900376320,-0.152697980403900,0.118976175785065,-0.300015389919281,0.294978618621826,0.235741063952446,-0.160169556736946,0.046983137726784,0.058169711381197,-0.184705182909966,-0.117818936705589,-0.208677470684052,0.259905517101288,0.211902439594269,0.422786504030228) * MODEL5_texOff(vec2(-1,0));
res += mat4(-0.067820161581039,-0.049266271293163,-0.122011803090572,0.035933338105679,0.177821516990662,-0.090827457606792,-0.291786819696426,0.103771023452282,-0.004148508422077,0.165074884891510,0.486139029264450,-0.165750324726105,0.064600899815559,-0.020265426486731,0.166444063186646,0.055973969399929) * MODEL5_texOff(vec2(-1,1));
res += mat4(0.156421020627022,0.002529037650675,0.087602943181992,0.019003234803677,0.097582943737507,0.257882624864578,-0.197109833359718,0.074673086404800,-0.194569095969200,0.019013660028577,-0.017175113782287,-0.101201966404915,0.127183631062508,-0.419228225946426,0.020854583010077,-0.047075167298317) * MODEL5_texOff(vec2(0,-1));
res += mat4(0.080265171825886,0.692267179489136,-0.201004326343536,-0.011472754180431,-0.716705381870270,-0.575874209403992,0.244527086615562,0.110450141131878,0.451831758022308,-0.547187268733978,-0.143628716468811,-0.130714520812035,-0.102408029139042,-0.351780891418457,-0.117675274610519,-0.181552156805992) * MODEL5_texOff(vec2(0,0));
res += mat4(-0.042507942765951,-0.092616371810436,-0.162824809551239,0.221791714429855,0.666637122631073,0.627360165119171,-0.329446196556091,-0.107594557106495,-0.036403641104698,-0.439381957054138,0.684220314025879,-0.048658624291420,-0.045878686010838,-0.001006136415526,0.073579221963882,0.101376123726368) * MODEL5_texOff(vec2(0,1));
res += mat4(0.007361100520939,-0.094711564481258,0.060738857835531,-0.206032708287239,0.004327937960625,-0.122610978782177,-0.091068141162395,-0.067100308835506,-0.057631507515907,-0.141973495483398,-0.040639765560627,0.061076000332832,-0.090961098670959,-0.167454704642296,0.110032513737679,-0.019138710573316) * MODEL5_texOff(vec2(1,-1));
res += mat4(0.074361354112625,-0.006228863261640,0.127980202436447,-0.303922176361084,-0.071042604744434,0.096369564533234,-0.082922495901585,-0.008014873601496,0.125975251197815,0.023319503292441,0.035325251519680,0.103701889514923,-0.074807293713093,-0.103274881839752,-0.165302172303200,-0.125646620988846) * MODEL5_texOff(vec2(1,0));
res += mat4(-0.194179356098175,-0.039400652050972,-0.134207352995872,-0.177173182368279,-0.041595768183470,-0.002820715773851,0.084008440375328,-0.132430940866470,0.075638927519321,-0.031314615160227,-0.040747471153736,0.166564166545868,0.065295971930027,0.219306930899620,-0.004802898038179,-0.152041360735893) * MODEL5_texOff(vec2(1,1));
res += mat4(0.109684780240059,0.169078484177589,0.141980901360512,0.162901297211647,-0.055344432592392,-0.033471591770649,-0.021076779812574,0.007933155633509,0.008860076777637,-0.263267844915390,-0.057184860110283,-0.170071616768837,0.024688113480806,-0.033604025840759,-0.031564094126225,-0.118650615215302) * MODEL6_texOff(vec2(-1,-1));
res += mat4(-0.027489947155118,0.030979730188847,-0.024142796173692,0.080105334520340,0.156717717647552,-0.093335673213005,0.151999667286873,-0.481872975826263,-0.061316292732954,0.038480110466480,-0.031444672495127,-0.063595287501812,-0.101631261408329,0.044433012604713,0.289189636707306,0.123801589012146) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.102855555713177,-0.074811287224293,0.003443775465712,0.059712473303080,0.223585709929466,-0.096088148653507,-0.117821678519249,-0.088515795767307,0.075596034526825,0.152942195534706,0.249591037631035,0.024543320760131,0.058950498700142,-0.100115932524204,0.117631174623966,-0.025136800482869) * MODEL6_texOff(vec2(-1,1));
res += mat4(0.128736317157745,0.325637161731720,0.274397253990173,0.196560010313988,0.035271495580673,0.155108213424683,0.009845632128417,0.093521043658257,0.149442419409752,-0.118186824023724,-0.232003778219223,-0.039352566003799,-0.694675028324127,-0.458825618028641,0.330908805131912,0.218001976609230) * MODEL6_texOff(vec2(0,-1));
res += mat4(-0.241337493062019,0.158330678939819,-0.267651319503784,-0.024347366765141,-0.463084459304810,-0.061279650777578,0.109999261796474,0.271843880414963,-0.274538666009903,-0.111315809190273,0.334991544485092,0.276866555213928,0.011612277477980,0.169945999979973,0.152587294578552,-0.016690852120519) * MODEL6_texOff(vec2(0,0));
res += mat4(-0.090549059212208,0.177844241261482,-0.154130280017853,0.100085049867630,-0.058914814144373,0.006556440144777,-0.074305839836597,0.075787477195263,0.126065105199814,0.005776196718216,-0.061342071741819,0.205775365233421,0.118865184485912,-0.055182352662086,0.301917046308517,-0.060842961072922) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.023329090327024,0.167798385024071,0.171093717217445,-0.237662971019745,0.024907309561968,-0.003192357718945,0.112206481397152,0.283764213323593,0.110476821660995,-0.057824887335300,-0.116485096514225,0.198502406477928,0.010718276724219,-0.096057817339897,-0.056336261332035,-0.159877836704254) * MODEL6_texOff(vec2(1,-1));
res += mat4(-0.285165607929230,-0.230470821261406,-0.109623990952969,-0.217373386025429,-0.000554997997824,-0.407228767871857,-0.121450513601303,0.155625745654106,0.178085371851921,0.066838830709457,0.082327984273434,0.051858656108379,0.278244853019714,0.144204378128052,0.159671545028687,0.106461837887764) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.076400130987167,-0.167032063007355,0.003445402719080,0.220218390226364,-0.026460509747267,-0.032141260802746,0.005463381297886,0.162488847970963,0.067564658820629,0.007183309178799,0.016697039827704,-0.032577123492956,-0.031566478312016,-0.073298476636410,0.000890816270839,-0.044771846383810) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.166223794221878,0.082755461335182,-0.172763317823410,0.025329690426588) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.020211093127728,-0.072824046015739,-0.123987168073654,-0.107322089374065);
res += mat4(-0.064737096428871,0.067958526313305,0.090396672487259,0.055037681013346,0.013793966732919,0.120988480746746,-0.115923769772053,-0.161168470978737,0.294628173112869,0.216797173023224,0.343788564205170,0.285217612981796,-0.225830435752869,-0.016265800222754,-0.009703642688692,-0.119973354041576) * MODEL4_texOff(vec2(-1,-1));
res += mat4(0.489491492509842,0.298471271991730,0.174949437379837,0.108770884573460,-0.122254908084869,-0.177055105566978,-0.159013062715530,-0.335883021354675,0.114330224692822,-0.207929700613022,-0.454035460948944,-0.013642189092934,-0.513413846492767,-0.324402511119843,0.193740397691727,-0.606254041194916) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.072736844420433,0.368942171335220,-0.660433232784271,0.359308660030365,-0.129990234971046,-0.069447070360184,0.146319866180420,-0.220340013504028,0.126715719699860,-0.049468517303467,0.250403434038162,0.137874707579613,-0.354496657848358,-0.209035024046898,-0.233505815267563,-0.187999770045280) * MODEL4_texOff(vec2(-1,1));
res += mat4(-0.265689671039581,-0.362666904926300,0.134746268391609,-0.073202773928642,0.240048274397850,-0.169703975319862,-0.096540130674839,-0.108784057199955,0.431716710329056,0.027919324114919,0.045803628861904,-0.062611550092697,-0.150005847215652,0.068699359893799,-0.036536268889904,-0.048225346952677) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.384458184242249,-0.001696225604974,-0.079758517444134,-0.249005779623985,0.389059543609619,0.303256452083588,0.274338752031326,-0.091761194169521,-0.182472556829453,0.500753104686737,-0.460614174604416,0.387509793043137,-0.213545054197311,0.147968277335167,0.067321106791496,-0.010197820141912) * MODEL4_texOff(vec2(0,0));
res += mat4(0.291077107191086,-0.337950706481934,-0.119765385985374,0.182614326477051,-0.174934312701225,0.017953898757696,-0.169473469257355,-0.025103768333793,-0.338093906641006,-0.011115109547973,0.331927299499512,-0.000973348098341,-0.063706010580063,0.238872587680817,-0.494094282388687,0.272522449493408) * MODEL4_texOff(vec2(0,1));
res += mat4(-0.103766188025475,0.021251138299704,0.096293717622757,0.110597103834152,-0.026173340156674,-0.142035156488419,-0.092647373676300,0.044712468981743,-0.291172891855240,-0.119091965258121,-0.058734815567732,0.148321494460106,-0.086262531578541,0.011380502022803,0.066463567316532,-0.015909476205707) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.007155631668866,0.462837785482407,0.021128289401531,-0.301879227161407,0.576899826526642,-0.070767834782600,0.145665094256401,0.056456681340933,-0.013084388338029,0.150691673159599,0.083046764135361,-0.339552581310272,0.110569670796394,0.100561268627644,-0.068320862948895,0.092272996902466) * MODEL4_texOff(vec2(1,0));
res += mat4(-0.056434251368046,-0.069021768867970,-0.083134554326534,0.231657087802887,0.246883332729340,0.427593320608139,-0.057429272681475,-0.070096090435982,0.015182519331574,-0.177028477191925,-0.017774295061827,-0.284129709005356,-0.026650113984942,-0.005742682609707,-0.004782525822520,0.036167848855257) * MODEL4_texOff(vec2(1,1));
res += mat4(0.074263975024223,-0.021752279251814,-0.134490638971329,-0.029248567298055,0.159073263406754,-0.111512333154678,0.157341301441193,0.028527328744531,-0.118341587483883,-0.053615964949131,0.026452010497451,-0.087846279144287,-0.125513017177582,-0.056060519069433,-0.090967968106270,-0.024631511420012) * MODEL5_texOff(vec2(-1,-1));
res += mat4(-0.096552535891533,-0.220324784517288,-0.181131377816200,-0.092020981013775,-0.280813604593277,-0.027393192052841,-0.160131230950356,0.091014564037323,-0.520204186439514,-0.209959223866463,-0.161913424730301,-0.471922606229782,0.302974849939346,0.217453077435493,0.424601882696152,0.584932267665863) * MODEL5_texOff(vec2(-1,0));
res += mat4(0.023078046739101,0.114987343549728,0.010524268262088,-0.031649395823479,-0.052268262952566,-0.029957961291075,0.121388413012028,0.123440049588680,-0.011260278522968,0.024635903537273,-0.056489124894142,-0.154616579413414,-0.140713736414909,-0.036600317806005,0.067102119326591,0.050469875335693) * MODEL5_texOff(vec2(-1,1));
res += mat4(0.157000184059143,-0.098280005156994,0.135669052600861,0.016426390036941,0.116469517350197,0.076821237802505,0.048083111643791,-0.082472756505013,0.126154378056526,-0.120014712214470,-0.038794253021479,-0.035503115504980,-0.365634143352509,0.163854464888573,-0.104488857090473,-0.103866122663021) * MODEL5_texOff(vec2(0,-1));
res += mat4(0.579807460308075,0.383240461349487,-0.290836513042450,-0.167864680290222,0.054689057171345,0.618743419647217,0.270074069499969,0.257047981023788,-0.076748445630074,-0.012953523546457,-0.058429770171642,0.225301772356033,-0.002439020434394,-0.008710466325283,0.193395659327507,-0.237077161669731) * MODEL5_texOff(vec2(0,0));
res += mat4(0.039842870086432,0.256494939327240,0.016465142369270,0.172394350171089,0.058098498731852,0.238668605685234,0.023919411003590,-0.041844192892313,0.209743544459343,-0.028473105281591,0.073875188827515,0.042861726135015,-0.355855494737625,-0.096645809710026,-0.237280353903770,0.104838117957115) * MODEL5_texOff(vec2(0,1));
res += mat4(0.093921884894371,-0.021012768149376,-0.019089719280601,0.064409568905830,-0.043464444577694,-0.081377454102039,0.046693149954081,-0.167235687375069,-0.212135240435600,-0.032527267932892,-0.014103068970144,0.142373338341713,-0.058182634413242,-0.218132361769676,0.025044882670045,-0.092905640602112) * MODEL5_texOff(vec2(1,-1));
res += mat4(0.179642722010612,0.179288983345032,-0.082742266356945,-0.093590721487999,0.214954286813736,-0.057001866400242,0.057097163051367,-0.449028044939041,-0.231999084353447,0.004377415869385,0.056608766317368,0.051686480641365,0.057718638330698,-0.076109267771244,0.058104649186134,0.257377624511719) * MODEL5_texOff(vec2(1,0));
res += mat4(0.155253991484642,0.023789975792170,-0.035836730152369,-0.069033190608025,0.048588100820780,0.085959456861019,-0.019183298572898,-0.157889619469643,-0.054918095469475,0.016211932525039,-0.009543951600790,0.267196506261826,-0.111827686429024,0.044163927435875,-0.006163356360048,-0.026190930977464) * MODEL5_texOff(vec2(1,1));
res += mat4(-0.045524653047323,-0.066944137215614,-0.108890533447266,0.114406675100327,-0.113370873034000,0.112668402493000,-0.083457045257092,0.081356361508369,0.029904350638390,0.001485893852077,0.051316954195499,0.042568903416395,-0.101165048778057,-0.032701790332794,-0.035213626921177,-0.056835565716028) * MODEL6_texOff(vec2(-1,-1));
res += mat4(0.136648043990135,-0.031791996210814,0.186730265617371,0.584933936595917,-0.276777625083923,0.142669215798378,0.001303355209529,0.026306202635169,-0.192493423819542,-0.271149933338165,-0.539364635944366,0.614021062850952,0.180964395403862,0.076520510017872,-0.362873405218124,-0.795612692832947) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.343877941370010,-0.198726356029510,-0.436453580856323,0.470871925354004,-0.165762409567833,0.023291401565075,0.115080185234547,0.085654117166996,0.029847359284759,-0.068408243358135,0.189016446471214,-0.094486176967621,0.025367788970470,-0.041884899139404,0.147558853030205,-0.217137441039085) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.283510237932205,-0.006446948740631,0.083382606506348,-0.069400280714035,-0.230905205011368,0.274191498756409,-0.317409634590149,-0.025610020384192,0.143689021468163,0.477164000272751,-0.100551113486290,-0.092152230441570,-0.081440582871437,-0.016807762905955,0.132864445447922,0.092317640781403) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.149023801088333,-0.004808542784303,-0.047924008220434,-0.032693788409233,0.273271858692169,-0.061748381704092,-0.034785337746143,-0.045674744993448,-0.146285668015480,0.072567418217659,0.032290533185005,-0.459165066480637,-0.125403687357903,-0.213190764188766,-0.134466990828514,0.292527616024017) * MODEL6_texOff(vec2(0,0));
res += mat4(0.027162658050656,0.139631584286690,-0.061675205826759,-0.435702085494995,0.066456839442253,0.495967000722885,0.072121553122997,-0.046768382191658,-0.072280175983906,0.044662121683359,0.009836389683187,-0.081630520522594,-0.118843890726566,-0.031397074460983,0.005915681365877,0.178188070654869) * MODEL6_texOff(vec2(0,1));
res += mat4(0.015195672400296,0.377207726240158,0.026605926454067,-0.143368437886238,-0.245938256382942,0.178655102849007,-0.090191945433617,0.079198971390724,0.011814238503575,-0.089673265814781,0.002825151430443,-0.116370365023613,-0.004100479185581,-0.084415405988693,0.145083159208298,0.059284713119268) * MODEL6_texOff(vec2(1,-1));
res += mat4(-0.341791152954102,-0.108422338962555,-0.085937678813934,-0.087584689259529,-0.244506716728210,0.001135105034336,-0.123255565762520,0.130839154124260,0.053779691457748,0.052046798169613,-0.043020036071539,-0.264165699481964,0.022354213520885,-0.075053200125694,-0.207578167319298,0.450379520654678) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.105904117226601,-0.058831557631493,-0.043979141861200,-0.199383497238159,0.019274797290564,0.111314669251442,0.052263740450144,0.104862928390503,-0.033322528004646,-0.103978067636490,0.004567428026348,-0.068880148231983,0.039096236228943,-0.141982525587082,0.016364563256502,-0.108874656260014) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.106733448803425,0.122261159121990,-0.238962858915329,0.188550591468811) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE MODEL3
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 3_3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.183068856596947,-0.101167596876621,0.012467947788537,-0.036297526210546);
res += mat4(0.089652366936207,0.107677809894085,-0.088970094919205,0.012957210652530,0.319845467805862,-0.342935204505920,-0.198220506310463,0.215089842677116,0.029914978891611,0.015703544020653,0.139738693833351,0.031863119453192,-0.073967404663563,0.101429320871830,-0.027491822838783,-0.098060145974159) * MODEL4_texOff(vec2(-1,-1));
res += mat4(0.324270129203796,0.176052391529083,0.019726395606995,0.125203907489777,0.279362142086029,-0.364974051713943,0.081304736435413,0.021868562325835,-0.300695717334747,-0.067403346300125,-0.205861061811447,0.194201678037643,-0.243142008781433,-0.074313633143902,-0.095904991030693,0.236326858401299) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.104337781667709,0.182865634560585,0.144069045782089,-0.118318587541580,0.145016551017761,-0.156463578343391,0.281169712543488,-0.144611015915871,-0.022027393803000,-0.060682445764542,-0.230012640357018,-0.021353499963880,-0.018961992114782,0.030685927718878,-0.041453048586845,-0.044690720736980) * MODEL4_texOff(vec2(-1,1));
res += mat4(-0.055925820022821,-0.160115242004395,0.021166313439608,-0.064046777784824,-0.118968062102795,-0.042504332959652,0.046796824783087,0.131643071770668,0.106991954147816,0.019266499206424,-0.240073218941689,0.062162403017282,0.115962736308575,-0.088772796094418,0.089053124189377,0.039379086345434) * MODEL4_texOff(vec2(0,-1));
res += mat4(-0.048599489033222,-0.806960105895996,0.026138106361032,-0.144640073180199,-0.232701703906059,-0.308052510023117,-0.323885530233383,-0.086469471454620,0.747786581516266,-0.310794085264206,0.290141701698303,-0.232346922159195,0.154752045869827,0.391915380954742,-0.217334762215614,-0.270966649055481) * MODEL4_texOff(vec2(0,0));
res += mat4(0.163022518157959,0.132534340023994,-0.269098967313766,0.175092294812202,0.063960239291191,-0.145303264260292,0.027603911235929,-0.342475593090057,0.123490013182163,-0.016425315290689,-0.068577632308006,0.167975783348083,0.218397602438927,-0.000249905424425,0.224190279841423,-0.016437044367194) * MODEL4_texOff(vec2(0,1));
res += mat4(0.108361132442951,0.146504089236259,-0.140045970678329,0.062768429517746,-0.318802595138550,0.014571191743016,0.226374194025993,0.077389642596245,0.107826434075832,0.053185384720564,-0.205364614725113,0.009550821967423,0.248204529285431,-0.072467163205147,0.033022228628397,-0.097141973674297) * MODEL4_texOff(vec2(1,-1));
res += mat4(-0.157084122300148,0.186793729662895,0.087082162499428,0.193443804979324,-0.179574489593506,0.187807247042656,-0.026155117899179,0.072452172636986,-0.334910005331039,0.180545926094055,0.262865632772446,-0.051975950598717,0.522812187671661,-0.809558212757111,-0.003438639221713,-0.188219651579857) * MODEL4_texOff(vec2(1,0));
res += mat4(0.136964052915573,-0.059766776859760,0.042762365192175,-0.031264070421457,-0.435659557580948,0.095793060958385,-0.060361199080944,-0.217243343591690,-0.081156179308891,-0.066656902432442,0.261167347431183,-0.094087429344654,0.110635481774807,-0.026351710781455,-0.026997707784176,0.211799889802933) * MODEL4_texOff(vec2(1,1));
res += mat4(0.123517282307148,-0.152714416384697,0.006460834760219,-0.024494938552380,-0.063184089958668,0.017589960247278,-0.011497241444886,-0.039521481841803,-0.066908463835716,-0.062072176486254,0.000020101237169,0.052850358188152,0.045961417257786,-0.185802996158600,0.132280111312866,-0.110487096011639) * MODEL5_texOff(vec2(-1,-1));
res += mat4(0.249048501253128,-0.287503093481064,0.061862424015999,0.014632591046393,-0.099359810352325,0.014532860368490,0.070872649550438,0.014228533022106,-0.058883648365736,0.319877415895462,-0.199027121067047,-0.178681746125221,-0.279932022094727,0.284416615962982,-0.066420763731003,-0.270474106073380) * MODEL5_texOff(vec2(-1,0));
res += mat4(-0.048219483345747,0.023180950433016,0.076515130698681,-0.128822386264801,0.036109615117311,0.017869019880891,0.017859751358628,0.123885951936245,-0.090711638331413,-0.092813372612000,0.052171565592289,0.003842710517347,-0.134160190820694,0.024520989507437,0.061955098062754,0.035367138683796) * MODEL5_texOff(vec2(-1,1));
res += mat4(-0.004231523722410,-0.130364909768105,-0.014736084267497,-0.085630893707275,-0.013190527446568,0.006485871970654,-0.152266606688499,-0.267152547836304,0.059327069669962,-0.047564417123795,0.224565908312798,0.080172002315521,0.007684099487960,-0.110901422798634,0.406829059123993,-0.058359105139971) * MODEL5_texOff(vec2(0,-1));
res += mat4(-0.042405024170876,0.048331968486309,-0.408363401889801,0.639689564704895,-0.045772805809975,0.007789353840053,0.660338103771210,-0.059556223452091,-0.014598431997001,-0.186738640069962,0.085673108696938,-0.101568654179573,0.221695557236671,0.013599100522697,0.319740802049637,0.128628417849541) * MODEL5_texOff(vec2(0,0));
res += mat4(-0.036962717771530,-0.109375961124897,-0.163621142506599,-0.465151578187943,0.211200177669525,-0.249112024903297,-0.027975531294942,0.241180598735809,-0.074085414409637,-0.100854568183422,-0.203235760331154,0.552663326263428,-0.001854391302913,0.462661057710648,0.053435243666172,0.073074780404568) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.100198440253735,0.060038115829229,0.020250849425793,0.111629068851471,0.010901784524322,0.048809114843607,0.128507927060127,0.036841474473476,0.016786321997643,0.042244695127010,-0.150441229343414,-0.114430345594883,-0.050444155931473,0.038386981934309,0.164467796683311,-0.007138176355511) * MODEL5_texOff(vec2(1,-1));
res += mat4(-0.233602270483971,0.206815451383591,0.247053384780884,-0.020449990406632,0.135987058281898,-0.143511697649956,-0.278771072626114,0.031574103981256,-0.072329230606556,0.063260518014431,0.203259885311127,-0.001693480415270,0.011821959167719,-0.217616736888885,0.260403871536255,-0.103762395679951) * MODEL5_texOff(vec2(1,0));
res += mat4(-0.101210370659828,0.055148810148239,-0.028982954099774,-0.260254174470901,-0.296647459268570,0.026356667280197,0.004915561061352,0.262293219566345,-0.095231361687183,0.026533907279372,0.240197896957397,0.169277891516685,0.095847554504871,-0.239002808928490,0.070441618561745,-0.002175084780902) * MODEL5_texOff(vec2(1,1));
res += mat4(0.120662882924080,0.005075371824205,-0.001149333082139,-0.068870536983013,0.111042119562626,0.107551507651806,0.015317170880735,0.066524259746075,0.079036019742489,0.293249398469925,-0.264350891113281,-0.155054852366447,-0.061624243855476,-0.038405936211348,0.240635454654694,0.039507776498795) * MODEL6_texOff(vec2(-1,-1));
res += mat4(0.062724359333515,0.086237184703350,-0.182340562343597,-0.133466839790344,0.321177333593369,0.132245212793350,0.304982274770737,-0.007044133264571,0.233053848147392,0.249421000480652,0.304006636142731,-0.103330135345459,-0.217634677886963,0.116530269384384,-0.142358168959618,-0.168028473854065) * MODEL6_texOff(vec2(-1,0));
res += mat4(-0.054651264101267,0.098420612514019,-0.298666328191757,-0.124608777463436,0.272672206163406,0.073186814785004,0.086470678448677,0.072540186345577,0.003639942733571,0.087643288075924,-0.264546334743500,0.173691004514694,0.010672553442419,-0.027627170085907,0.159015551209450,0.013223638758063) * MODEL6_texOff(vec2(-1,1));
res += mat4(0.027337990701199,0.141604572534561,-0.080371513962746,-0.064004421234131,0.008721702732146,0.025333626195788,-0.017790954560041,-0.024390673264861,-0.089111879467964,0.007731305900961,-0.208034560084343,-0.149544894695282,-0.041448395699263,0.061008367687464,-0.094633877277374,0.074727840721607) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.089306518435478,-0.090425588190556,-0.536757647991180,0.138341933488846,-0.863400280475616,0.197965577244759,-0.028798883780837,-0.062141843140125,-0.011930117383599,0.002033432479948,-0.229302659630775,0.200455814599991,0.074023097753525,0.121125526726246,0.378290027379990,-0.450235128402710) * MODEL6_texOff(vec2(0,0));
res += mat4(-0.186545297503471,0.041550736874342,-0.069939419627190,-0.218686968088150,-0.180727273225784,0.098254725337029,-0.064226701855659,-0.073628962039948,0.117592141032219,0.056816976517439,-0.175658062100410,0.210092797875404,0.024368839338422,0.005907295271754,-0.028052065521479,0.320209711790085) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.501326143741608,0.290182977914810,0.075429707765579,0.148174345493317,0.006032909266651,0.039309017360210,0.042475849390030,0.174118667840958,0.095979578793049,0.140927627682686,-0.229720667004585,0.059032805263996,-0.060050975531340,-0.183815568685532,-0.137553349137306,0.031639762222767) * MODEL6_texOff(vec2(1,-1));
res += mat4(-0.471410036087036,0.247197985649109,0.019938319921494,-0.194694444537163,0.003464379580691,-0.164043545722961,-0.042583834379911,0.009431744925678,0.169563919305801,0.032960012555122,0.086129687726498,0.108764342963696,0.077433615922928,-0.053213186562061,-0.198323249816895,-0.118495248258114) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.155953958630562,0.065091907978058,0.000813513004687,0.026443496346474,0.018310993909836,0.061785131692886,0.189819186925888,0.191306188702583,0.080243453383446,-0.116695091128349,-0.026083910837770,0.055322878062725,-0.148595765233040,0.057472601532936,-0.057006437331438,0.096275426447392) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.042480960488319,0.491908848285675,-0.195708587765694,0.373985230922699) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(0.013605229556561,-0.203712821006775,-0.067733980715275,0.129937171936035);
res += mat4(-0.218111053109169,-0.096335567533970,-0.065581701695919,-0.431554883718491,-0.055385775864124,-0.088337659835815,0.207245841622353,-0.153807222843170,0.112091444432735,0.172377094626427,-0.049203526228666,-0.049308724701405,0.129652515053749,-0.023710001260042,0.053943119943142,0.021041842177510) * MODEL4_texOff(vec2(-1,-1));
res += mat4(-0.359303206205368,0.354755699634552,-0.509431958198547,-0.508016824722290,0.028699036687613,-0.190713480114937,0.069179207086563,-0.217869982123375,0.285199373960495,-0.152369931340218,-0.174605637788773,0.242892012000084,0.220526292920113,-0.409231334924698,0.151117980480194,0.082592286169529) * MODEL4_texOff(vec2(-1,0));
res += mat4(-0.059795703738928,0.095773048698902,-0.046550188213587,-0.160814180970192,-0.099791258573532,-0.064575843513012,0.063473448157310,-0.051774881780148,0.062050200998783,0.168751582503319,-0.067971855401993,-0.014048116281629,-0.035752847790718,-0.061676103621721,0.050159960985184,-0.034364975988865) * MODEL4_texOff(vec2(-1,1));
res += mat4(-0.154639318585396,0.309210985898972,0.187853261828423,-0.325098872184753,-0.036443792283535,-0.079058319330215,0.113381139934063,-0.163942992687225,0.266802728176117,-0.306976020336151,-0.173768892884254,0.213141724467278,0.182541936635971,-0.018706986680627,0.249116837978363,-0.052685376256704) * MODEL4_texOff(vec2(0,-1));
res += mat4(0.008784440346062,-0.816526710987091,-0.029110115021467,0.628517508506775,-0.087160095572472,0.156285271048546,0.358405411243439,-1.087840199470520,-0.224847868084908,0.282549858093262,-0.050545066595078,-0.094218805432320,-0.015006721019745,0.686588168144226,-0.112045899033546,-0.040292035788298) * MODEL4_texOff(vec2(0,0));
res += mat4(0.215023964643478,-0.304957062005997,0.036062911152840,-0.135509774088860,0.060435246676207,0.026937818154693,-0.085910446941853,-0.063275501132011,-0.060033734887838,0.042188704013824,0.206148266792297,0.055915433913469,-0.127178847789764,0.083800271153450,-0.089548990130424,-0.278656870126724) * MODEL4_texOff(vec2(0,1));
res += mat4(-0.027476966381073,0.130418047308922,-0.100899279117584,-0.007146801333874,-0.016469251364470,0.072387315332890,-0.155626654624939,-0.005489394068718,0.169899150729179,0.082587510347366,0.243161708116531,0.212623909115791,0.124868400394917,0.275117456912994,0.079747095704079,0.032087769359350) * MODEL4_texOff(vec2(1,-1));
res += mat4(0.114343389868736,-0.051488373428583,0.042267825454473,-0.050531398504972,0.018327599391341,0.680467188358307,0.150929182767868,-0.262644886970520,-0.183023989200592,-0.226696670055389,0.246581688523293,0.220511049032211,-0.008576316758990,-0.096570521593094,0.153290867805481,0.045004948973656) * MODEL4_texOff(vec2(1,0));
res += mat4(-0.005475691054016,0.172388315200806,0.027400003746152,0.050907786935568,0.066705234348774,-0.132962584495544,-0.223275005817413,-0.049893565475941,0.056601181626320,-0.039927758276463,0.127622410655022,-0.012192312628031,0.155792832374573,0.260769277811050,-0.092820331454277,-0.177615880966187) * MODEL4_texOff(vec2(1,1));
res += mat4(-0.015189734287560,-0.036104261875153,0.143904879689217,-0.096406601369381,0.197361707687378,-0.032122932374477,-0.032238136976957,-0.013679223135114,0.142975598573685,0.016437122598290,0.244991660118103,0.135750561952591,-0.054932944476604,-0.048683278262615,-0.034978814423084,-0.149072393774986) * MODEL5_texOff(vec2(-1,-1));
res += mat4(0.009654900990427,-0.416263818740845,0.444004118442535,0.023453634232283,0.110989816486835,0.174194365739822,0.101088225841522,0.196061983704567,0.052720159292221,-0.014319252222776,0.150519460439682,-0.237032189965248,-0.091505400836468,0.200750306248665,0.057138867676258,-0.024208478629589) * MODEL5_texOff(vec2(-1,0));
res += mat4(0.046886455267668,-0.115535348653793,0.154747784137726,0.013919716700912,0.059254422783852,-0.064002439379692,0.040740169584751,0.100262984633446,-0.152757734060287,0.042401481419802,0.065526798367500,-0.131295293569565,0.157714083790779,0.225137203931808,0.130375325679779,0.077676802873611) * MODEL5_texOff(vec2(-1,1));
res += mat4(-0.242510333657265,0.114548601210117,-0.268590837717056,-0.094544976949692,0.296872586011887,-0.332948118448257,0.249164983630180,-0.036761153489351,0.215806350111961,0.008204728364944,0.256207555532455,0.086189217865467,-0.123433813452721,0.142135590314865,-0.017515359446406,-0.327005535364151) * MODEL5_texOff(vec2(0,-1));
res += mat4(-0.223521247506142,0.297084540128708,-0.444525897502899,-0.226919323205948,-0.637468636035919,-0.048805963248014,-0.173825412988663,-0.358214378356934,0.041686102747917,0.061252295970917,0.035277720540762,-0.246014550328255,-0.008396905846894,0.265863656997681,-0.073675759136677,0.281726449728012) * MODEL5_texOff(vec2(0,0));
res += mat4(-0.037688948214054,0.044667735695839,-0.238384053111076,0.053968824446201,-0.232843399047852,0.117924809455872,-0.024601176381111,0.024756414815784,0.063198015093803,0.215113028883934,-0.083574295043945,-0.185164704918861,0.103482499718666,0.076510302722454,0.084841221570969,0.026086829602718) * MODEL5_texOff(vec2(0,1));
res += mat4(-0.115745462477207,-0.130010500550270,-0.025041094049811,0.076237037777901,0.215617716312408,0.155761033296585,0.086515769362450,0.086232908070087,0.053678486496210,0.047135807573795,-0.181278452277184,0.035245627164841,0.066084444522858,0.199529096484184,0.114330366253853,-0.109354339540005) * MODEL5_texOff(vec2(1,-1));
res += mat4(0.103715457022190,-0.042586490511894,0.057100780308247,-0.222347825765610,0.261921197175980,0.126732170581818,0.256616950035095,0.019203625619411,-0.065703473985195,0.140239164233208,-0.215678796172142,0.000049554517318,0.024465125054121,0.102308303117752,-0.023050500079989,0.085563622415066) * MODEL5_texOff(vec2(1,0));
res += mat4(-0.107813328504562,-0.058536838740110,-0.019223900511861,0.070913538336754,0.101799920201302,-0.204823479056358,0.065813153982162,-0.051608335226774,-0.081305898725986,0.155024603009224,0.016563694924116,0.061424374580383,0.039266679435968,-0.030384674668312,-0.220493003726006,-0.050625849515200) * MODEL5_texOff(vec2(1,1));
res += mat4(-0.088955231010914,-0.053410366177559,-0.141906648874283,0.074877023696899,0.057553861290216,0.152694284915924,-0.061942432075739,0.225720271468163,-0.111007809638977,0.065930590033531,-0.251836627721786,0.266158699989319,-0.070290334522724,0.052625551819801,-0.065828487277031,-0.010783875361085) * MODEL6_texOff(vec2(-1,-1));
res += mat4(-0.207664281129837,0.234661981463432,-0.238430097699165,0.038466658443213,0.141652390360832,-0.096242718398571,0.222594797611237,0.370731472969055,0.236219793558121,-0.170239850878716,-0.130423724651337,0.283242732286453,0.122445143759251,-0.031192224472761,0.137098103761673,-0.114402666687965) * MODEL6_texOff(vec2(-1,0));
res += mat4(0.133960142731667,0.047445032745600,-0.232134029269218,0.297784507274628,0.041842702776194,-0.047099947929382,0.088657401502132,0.048572767525911,0.084027990698814,-0.027538230642676,0.009390829131007,0.109610974788666,-0.013131374493241,0.128786802291870,0.015857132151723,-0.006728897802532) * MODEL6_texOff(vec2(-1,1));
res += mat4(-0.277190148830414,0.072389274835587,-0.129460602998734,0.086135484278202,-0.040312431752682,-0.009153350256383,-0.241575583815575,0.126370280981064,-0.298857122659683,-0.165026769042015,-0.045124311000109,0.207770317792892,-0.134815201163292,0.071258574724197,-0.339225769042969,0.090082332491875) * MODEL6_texOff(vec2(0,-1));
res += mat4(0.221632301807404,-0.386078149080276,-0.164182424545288,0.038343239575624,-0.379009306430817,-0.003954573068768,0.036811240017414,-0.454137533903122,-0.052224863320589,-0.468575090169907,0.133850514888763,0.122517846524715,0.216602519154549,0.147388845682144,-0.793720602989197,-0.049053683876991) * MODEL6_texOff(vec2(0,0));
res += mat4(-0.259917110204697,-0.367493093013763,-0.167986124753952,-0.092055805027485,-0.334022462368011,-0.045590423047543,-0.049574017524719,0.034441743046045,-0.043705634772778,-0.061280574649572,0.036890577524900,0.084989696741104,-0.043534249067307,0.464773386716843,-0.065174624323845,-0.098282605409622) * MODEL6_texOff(vec2(0,1));
res += mat4(-0.211105346679688,-0.122721768915653,0.026624115183949,-0.100832879543304,-0.025156103074551,-0.051241636276245,-0.105543687939644,0.094922564923763,-0.045783258974552,-0.074528142809868,0.071867510676384,0.195170298218727,-0.001234739320353,0.054884418845177,0.172321557998657,-0.003915135283023) * MODEL6_texOff(vec2(1,-1));
res += mat4(0.022000132128596,-0.126106172800064,0.354235351085663,0.078031755983829,-0.220846518874168,0.075257845222950,-0.100912958383560,-0.106013387441635,0.110887944698334,0.104838818311691,0.161525726318359,0.093723528087139,-0.081598602235317,0.187970414757729,0.226149260997772,0.067166700959206) * MODEL6_texOff(vec2(1,0));
res += mat4(-0.166039586067200,-0.094407759606838,0.382802098989487,-0.088404111564159,-0.097104057669640,0.074336223304272,-0.009828618727624,-0.126101374626160,0.056885097175837,-0.031219206750393,-0.009797006845474,0.028150321915746,0.043758727610111,-0.016846463084221,-0.140093058347702,0.002177987014875) * MODEL6_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.747136712074280,0.011301233433187,0.209107205271721,0.035600557923317) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL4
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 4_1

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.432566523551941,-0.190928786993027,-0.021964721381664,-0.311647385358810);
res += mat4(-0.077740795910358,0.107939355075359,0.013417554087937,-0.011103143915534,-0.174072667956352,-0.098439015448093,0.025869045406580,0.128041326999664,-0.099821694195271,0.004505753982812,-0.028064269572496,0.042939126491547,0.063896924257278,-0.073008023202419,-0.031739171594381,-0.019030939787626) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.064622044563293,-0.121329337358475,0.008153780363500,-0.118681266903877,-0.141475841403008,0.066925860941410,-0.107535034418106,0.409354925155640,0.105207845568657,-0.029741285368800,-0.028415841981769,-0.157047808170319,0.136294156312943,0.333269149065018,0.006877843756229,0.161749660968781) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.016553867608309,0.160164386034012,0.033292442560196,0.057468857616186,0.179425776004791,0.095350749790668,0.010996794328094,0.034751128405333,0.070971533656120,-0.111376315355301,0.006060968618840,-0.065447308123112,0.144762575626373,0.063899427652359,0.104318231344223,0.027869451791048) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.202609315514565,0.390829741954803,0.051787171512842,-0.067294411361217,-0.015527555719018,-0.317294210195541,-0.032760325819254,0.031643435359001,0.124732904136181,-0.318739622831345,-0.007229696493596,-0.153474837541580,-0.016709204763174,-0.170008197426796,-0.028229400515556,0.055896196514368) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.518826782703400,-0.299589484930038,-0.030948687344790,0.163016065955162,-0.453685015439987,0.294003665447235,0.158952862024307,-0.297614574432373,0.009730212390423,0.412676662206650,0.030088910833001,0.136977419257164,0.181068405508995,0.277181386947632,-0.243442386388779,-0.030858064070344) * MODEL1_texOff(vec2(0,0));
res += mat4(0.253039896488190,0.287073791027069,0.095667272806168,-0.189064055681229,0.384453266859055,-0.306621670722961,0.007927967235446,0.048633884638548,0.212341770529747,-0.273791611194611,0.028206232935190,-0.067676052451134,-0.216728121042252,0.052368190139532,0.376479089260101,-0.059527553617954) * MODEL1_texOff(vec2(0,1));
res += mat4(0.011486227624118,0.023396074771881,0.005772000644356,0.039020355790854,-0.018334098160267,-0.136706098914146,-0.029081121087074,0.063894569873810,0.254853516817093,-0.197114303708076,-0.055647838860750,-0.167690247297287,-0.101461417973042,-0.166290223598480,-0.062666758894920,-0.029950210824609) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.122626453638077,0.029842142015696,0.030553393065929,-0.101816959679127,0.216797068715096,0.059595782309771,-0.081763245165348,0.034554827958345,0.001770255039446,0.108869969844818,-0.022853303700686,-0.332062125205994,-0.173484385013580,0.005310547072440,-0.118206404149532,-0.150078356266022) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.035279966890812,0.166627466678619,0.041001312434673,-0.091805621981621,0.019486164674163,-0.057906791567802,0.007455178070813,-0.050878014415503,0.056569129228592,-0.054246187210083,0.042549528181553,-0.115652680397034,-0.078092299401760,-0.055802658200264,-0.064079225063324,0.013355747796595) * MODEL1_texOff(vec2(1,1));
res += mat4(0.073088683187962,-0.000330294889864,-0.009993067011237,0.150207415223122,0.152810275554657,0.145713612437248,0.018279716372490,0.024383664131165,0.011313513852656,0.016891149803996,-0.014819417148829,-0.050301887094975,0.051968317478895,0.068573527038097,0.031373519450426,-0.023275662213564) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.028759377077222,-0.010919351130724,0.008969246409833,0.257997363805771,-0.174590751528740,-0.169256478548050,0.111424461007118,-0.041240811347961,0.083842664957047,0.071935556828976,-0.038697604089975,0.159051284193993,0.354384958744049,0.028858205303550,0.106843873858452,0.329555332660675) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.073460325598717,-0.028619697317481,0.061309475451708,-0.058681935071945,0.029514959082007,-0.029987398535013,0.037445962429047,0.100434780120850,0.025203380733728,0.020462075248361,-0.008340797387064,-0.066869236528873,-0.158009350299835,0.025960884988308,0.057661380618811,0.030297318473458) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.426104903221130,0.236587360501289,0.039779506623745,-0.255466312170029,-0.121002241969109,0.395963698625565,0.031833697110415,-0.100838720798492,0.126976892352104,0.197443366050720,0.042404200881720,0.018385827541351,0.137195110321045,0.206518620252609,-0.006456585600972,0.065593555569649) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.037632726132870,0.014724974520504,-0.097151562571526,-0.110435694456100,-0.433161675930023,-0.743896663188934,0.067489601671696,-0.435589641332626,-0.018633831292391,0.262049347162247,-0.049310624599457,-0.330641239881516,-0.088101625442505,0.011677976697683,-0.087231680750847,0.582853674888611) * MODEL2_texOff(vec2(0,0));
res += mat4(0.171954050660133,0.065131321549416,0.015131506137550,0.115817055106163,-0.002885687630624,0.155044436454773,0.080289334058762,-0.137293413281441,0.223553523421288,-0.153275102376938,-0.011779423803091,0.115509822964668,-0.038510099053383,0.002180941402912,0.008346505463123,0.020115274935961) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.128000557422638,-0.052381083369255,0.045698694884777,-0.017861146479845,-0.048327419906855,0.072660893201828,-0.053576394915581,0.164015859365463,0.310297220945358,0.214247345924377,0.006730840075761,-0.276298552751541,-0.001887176651508,-0.038486778736115,-0.026686633005738,-0.095668315887451) * MODEL2_texOff(vec2(1,-1));
res += mat4(-0.058807801455259,0.092047676444054,0.025003770366311,-0.200674101710320,-0.059662476181984,-0.033973403275013,-0.017357213422656,-0.328684002161026,-0.473991304636002,0.222381323575974,-0.048613633960485,0.130332022905350,-0.016710083931684,0.004065932240337,0.017081661149859,-0.199426293373108) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.076893031597137,-0.048293609172106,0.063273914158344,-0.190581247210503,0.013985135592520,-0.062270455062389,-0.014350822195411,-0.015658468008041,0.075176902115345,-0.108787409961224,-0.004054415039718,-0.082055605947971,-0.082954868674278,-0.016209462657571,-0.006023220717907,-0.030206782743335) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.049486543983221,-0.098012417554855,-0.058958701789379,0.126849517226219,0.029362116008997,0.001037377398461,0.002709353342652,0.013487868010998,-0.123193874955177,-0.045923911035061,0.007172096986324,0.095447935163975,-0.114605963230133,-0.011921852827072,0.016027214005589,0.032359138131142) * MODEL3_texOff(vec2(-1,-1));
res += mat4(-0.003570111934096,0.054855469614267,-0.136815950274467,-0.314678907394409,0.071023240685463,-0.082217402756214,0.113986447453499,0.174662709236145,-0.170823991298676,-0.164091289043427,-0.005604876670986,0.041078176349401,-0.158188760280609,-0.148754730820656,0.058947008103132,-0.050636753439903) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.030321741476655,-0.123480841517448,-0.041139364242554,-0.056879386305809,-0.005370231810957,0.142923906445503,0.008741998113692,-0.075829431414604,-0.114600978791714,0.071178957819939,0.036375217139721,-0.035118106752634,-0.039741482585669,0.041453681886196,-0.026567535474896,-0.032426193356514) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.209281519055367,-0.123412162065506,-0.028944419696927,-0.060729969292879,-0.008219059556723,0.024827158078551,0.042968165129423,0.064443148672581,-0.026214081794024,-0.310931503772736,-0.051594965159893,0.063756428658962,0.423473685979843,-0.529388844966888,0.097769878804684,0.143089532852173) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.341151922941208,-0.042952682822943,0.041431721299887,-0.133994221687317,0.130641862750053,-0.108379267156124,-0.300081461668015,-0.498527526855469,-0.431073278188705,0.183563917875290,0.028995698317885,0.139189362525940,-0.411041021347046,0.154571756720543,-0.260875612497330,0.016784200444818) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.203045308589935,0.066570274531841,-0.063404403626919,0.098706409335136,0.067617550492287,0.147132501006126,-0.004132888279855,0.041965771466494,0.138612627983093,-0.150867924094200,-0.009955250658095,0.197904139757156,0.067355424165726,-0.043117027729750,-0.001434948993847,-0.011112187989056) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.017831753939390,0.032684270292521,0.052253052592278,-0.012682297267020,0.018220191821456,-0.052832327783108,-0.002100689103827,0.031874369829893,-0.080780364573002,-0.123708687722683,0.004941898398101,-0.009832457639277,0.043396405875683,-0.133116334676743,0.055006142705679,0.052998512983322) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.072694003582001,0.013525442220271,0.047182675451040,0.301210880279541,-0.141787499189377,0.051134295761585,0.113516144454479,0.545506060123444,-0.114893332123756,0.075461655855179,-0.019710300490260,0.359282970428467,0.143370613455772,-0.083849564194679,0.016797527670860,-0.037888262420893) * MODEL3_texOff(vec2(1,0));
res += mat4(0.141118094325066,0.026746608316898,0.066481560468674,0.077390365302563,0.230403482913971,0.040307726711035,0.041666164994240,0.067123569548130,-0.017176840454340,-0.106297336518764,-0.026040244847536,0.031115941703320,-0.061025016009808,0.002205572789535,-0.042658135294914,0.065729327499866) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.077478609979153,0.270072788000107,0.945602536201477,0.094325765967369) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.326066642999649,-0.136133879423141,-0.013224503025413,-0.167060241103172);
res += mat4(0.202637627720833,0.030000947415829,0.056075181812048,-0.041968647390604,-0.168745934963226,-0.152978658676147,0.010760813020170,-0.111384257674217,0.100430689752102,-0.053532391786575,0.016156969591975,0.015812501311302,0.092702955007553,-0.071730911731720,-0.020681159570813,-0.067868500947952) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.178987652063370,0.005222640000284,-0.010603227652609,-0.051925320178270,0.076480545103550,-0.002500221366063,-0.089437514543533,-0.076866880059242,-0.059790965169668,0.001549472566694,0.008898793719709,-0.172438383102417,-0.059981130063534,-0.163220524787903,0.025379285216331,-0.130850896239281) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.160538807511330,0.091176785528660,0.120542220771313,0.033198643475771,0.115309506654739,0.045904006808996,0.123058691620827,0.085769027471542,0.238116130232811,-0.034468833357096,-0.002254677703604,0.063934586942196,-0.037450838834047,-0.010535639710724,-0.019421964883804,0.257835328578949) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.236412525177002,0.047355841845274,0.076402314007282,-0.024948773905635,0.022725878283381,0.040030207484961,-0.127614811062813,0.040827754884958,0.196729049086571,-0.017786279320717,-0.088065639138222,-0.090947017073631,-0.092266656458378,-0.056723989546299,-0.029316643252969,0.155351907014847) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.223176330327988,-0.046957105398178,-0.311038851737976,-0.261254280805588,-0.385338336229324,0.308483600616455,0.222881570458412,0.062469284981489,-0.122704833745956,-0.120857000350952,0.060584265738726,-0.299975663423538,-0.028901288285851,0.486259847879410,-0.175237312912941,-0.038430463522673) * MODEL1_texOff(vec2(0,0));
res += mat4(0.371131002902985,-0.069400444626808,0.342345029115677,0.064180672168732,0.008156758733094,0.122657671570778,0.033134229481220,0.022872082889080,0.263730645179749,-0.015673976391554,0.131757840514183,0.472051560878754,0.121186405420303,-0.248209014534950,-0.042648114264011,0.164222404360771) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.097118251025677,-0.176085934042931,-0.130892634391785,-0.061733257025480,0.118325993418694,0.060572978109121,-0.014751662500203,-0.008135385811329,-0.240372955799103,-0.109581463038921,-0.022036347538233,0.118052713572979,0.204676657915115,0.085148632526398,0.031060757115483,0.066654600203037) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.236780419945717,-0.032603420317173,0.204659730195999,-0.201986879110336,-0.114481672644615,-0.445259064435959,-0.125537261366844,0.029185442253947,0.340866416692734,0.108661256730556,-0.022938366979361,-0.314629405736923,0.070629775524139,-0.084658853709698,0.093952789902687,0.296368479728699) * MODEL1_texOff(vec2(1,0));
res += mat4(0.118429407477379,-0.095490992069244,0.089697532355785,-0.060887053608894,-0.104342900216579,-0.085444331169128,-0.110773757100105,-0.009703675284982,0.258341372013092,-0.144501745700836,-0.088246449828148,0.145024597644806,0.012220843695104,-0.015409203246236,0.158213183283806,0.140025362372398) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.026295585557818,-0.032410524785519,-0.022583745419979,-0.163470283150673,-0.055708136409521,0.076105460524559,0.011298135854304,0.241355612874031,0.073772132396698,0.058865793049335,-0.002091669244692,0.023527363315225,0.301448613405228,0.062746733427048,-0.081236191093922,-0.216509684920311) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.095284320414066,-0.061091814190149,0.058865882456303,0.033982302993536,0.027108898386359,-0.025145214051008,-0.072399757802486,-0.287367284297943,-0.016288947314024,-0.026956174522638,-0.016342533752322,0.138182491064072,-0.012578117661178,0.077583938837051,-0.010950293391943,0.307247579097748) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.036872152239084,-0.170006960630417,-0.072022870182991,-0.165078148245811,0.015032665804029,0.040409557521343,0.052930641919374,0.087025962769985,-0.097725763916969,0.019077997654676,0.026501944288611,0.055280540138483,0.028101116418839,-0.137154877185822,-0.271644264459610,-0.122018977999687) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.056856613606215,-0.159029185771942,0.087445631623268,-0.259614139795303,-0.010458746924996,-0.095091059803963,0.027599066495895,0.238775730133057,0.226170718669891,0.022655658423901,-0.076212316751480,0.054830521345139,-0.123920947313309,-0.187397480010986,0.076450809836388,0.120091073215008) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.553636729717255,-0.040685389190912,0.420986592769623,0.319810777902603,-0.286728769540787,-0.067302316427231,-0.208461865782738,-0.561254918575287,-0.008210851810873,-0.003754156408831,-0.012726393528283,0.316531747579575,0.343156993389130,0.643600761890411,0.572091281414032,0.083005145192146) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.309729188680649,-0.014060416258872,-0.208865329623222,-0.266783088445663,0.216096535325050,-0.144016399979591,0.077393367886543,-0.034259553998709,-0.108698047697544,0.032207347452641,-0.004924324806780,-0.068838991224766,-0.183180436491966,-0.140337839722633,-0.151994213461876,0.113670922815800) * MODEL2_texOff(vec2(0,1));
res += mat4(0.064563356339931,-0.008113470859826,0.052849911153316,-0.121370874345303,-0.031748041510582,0.092610910534859,-0.049134142696857,-0.009391760453582,0.280983358621597,-0.179028958082199,-0.011610412970185,0.243874460458755,0.193367332220078,-0.099431522190571,0.069817475974560,-0.036538798362017) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.007967101410031,-0.113110989332199,-0.269629120826721,0.008703260682523,-0.024817090481520,0.192068532109261,0.185630485415459,-0.038459680974483,-0.291807174682617,0.183742523193359,0.075556412339211,0.649294674396515,0.092979453504086,-0.064967311918736,-0.117917776107788,0.018364967778325) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.012026529759169,-0.171755820512772,-0.107036910951138,-0.110646858811378,0.088116742670536,0.074789270758629,0.063642412424088,0.026804994791746,-0.285523325204849,0.062859825789928,-0.059126995503902,-0.346742659807205,0.029856724664569,-0.061968002468348,-0.039416834712029,-0.005702448077500) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.167366877198219,0.131287172436714,0.058409083634615,0.109905220568180,-0.149894610047340,-0.098568879067898,0.021880732849240,-0.186884179711342,0.131175443530083,0.071499809622765,-0.039836067706347,-0.096608072519302,-0.150636285543442,-0.109768673777580,0.006650421768427,-0.070444084703922) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.158531099557877,-0.231678351759911,-0.075800247490406,-0.231698632240295,-0.066156029701233,0.342166244983673,0.174985766410828,0.148630663752556,-0.190883308649063,0.091963909566402,0.103039354085922,0.128811463713646,-0.187559530138969,0.023284541442990,0.070883333683014,0.089078828692436) * MODEL3_texOff(vec2(-1,0));
res += mat4(-0.033217929303646,0.283667385578156,0.096443481743336,0.217149645090103,-0.007418844383210,0.043228074908257,-0.044779453426600,0.099780634045601,-0.012580697424710,-0.099050059914589,-0.131154879927635,-0.072471745312214,0.075421147048473,0.066471390426159,-0.041074465960264,-0.197711929678917) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.111011564731598,0.044633850455284,0.326288580894470,0.032466944307089,-0.194580048322678,0.153634756803513,-0.208576932549477,-0.107836894690990,0.030784754082561,-0.153489887714386,0.005766934249550,0.044421568512917,-0.065325632691383,0.087523207068443,-0.022264143452048,-0.349065899848938) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.035746682435274,0.272691726684570,0.103845573961735,-0.061713062226772,-0.280675798654556,0.267633974552155,-0.002539490815252,-0.349919110536575,0.057419214397669,-0.243278056383133,0.248037219047546,-0.201367840170860,-0.195067837834358,-0.371579140424728,-0.085804335772991,0.340882033109665) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.042713928967714,-0.108865298330784,0.024270335212350,-0.207919850945473,0.223462432622910,0.021834490820765,0.100661434233189,-0.028283994644880,-0.194439649581909,0.043855708092451,-0.071603506803513,0.137290000915527,0.029607897624373,-0.176150426268578,-0.035622619092464,-0.042542085051537) * MODEL3_texOff(vec2(0,1));
res += mat4(0.128753259778023,0.044522006064653,-0.164058431982994,-0.251739859580994,-0.087005868554115,0.239799663424492,0.087559446692467,0.071292221546173,0.060271300375462,0.109967894852161,0.058973059058189,-0.005652835126966,0.181355252861977,0.097026832401752,0.067726500332355,0.021979115903378) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.005111538339406,-0.023441979661584,-0.007841350510716,0.229169100522995,-0.175832554697990,-0.301796257495880,-0.352973610162735,0.032625425606966,0.175462543964386,-0.118799172341824,-0.485162317752838,0.148014560341835,-0.219006225466728,0.078927785158157,-0.018579633906484,0.088290758430958) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.103353954851627,-0.065075725317001,-0.060481879860163,-0.124299518764019,-0.036214940249920,0.065715573728085,0.024195728823543,-0.028242480009794,-0.123983740806580,0.051893342286348,-0.025916194543242,0.024086575955153,-0.008117545396090,-0.109681390225887,0.023263325914741,-0.294798761606216) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.050478607416153,0.097439981997013,0.859260797500610,-0.048696409910917) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL5
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 4_2

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.245621606707573,-0.454717606306076,-0.295187085866928,-0.305462300777435);
res += mat4(-0.118719749152660,-0.002327098976821,-0.128341048955917,-0.012664986774325,-0.049375113099813,0.012569840066135,-0.037915259599686,-0.120818279683590,0.065038315951824,-0.024192476645112,-0.071166522800922,-0.071538001298904,-0.123181767761707,0.089389964938164,0.091573491692543,-0.088811688125134) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.122408732771873,-0.170645833015442,0.119038626551628,-0.200975656509399,0.144847497344017,0.064088203012943,0.249891802668571,0.342956811189651,-0.055116843432188,0.126407995820045,-0.173537984490395,-0.086310163140297,-0.111381053924561,0.234396487474442,0.006094965152442,0.144785746932030) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.055088173598051,0.103306591510773,0.056640025228262,0.069657854735851,0.082491002976894,0.000456631125417,-0.008049573749304,-0.093322113156319,-0.222041592001915,0.061863701790571,-0.056881103664637,-0.142674013972282,-0.054573792964220,-0.042151600122452,-0.049329921603203,-0.128144353628159) * MODEL1_texOff(vec2(-1,1));
res += mat4(0.030604822561145,0.012356258928776,-0.219876378774643,-0.071044832468033,-0.170446529984474,-0.207493484020233,-0.054433941841125,-0.280936807394028,-0.033971928060055,-0.137004837393761,0.136070877313614,-0.038433909416199,0.011998082511127,0.009048069827259,0.065305940806866,-0.023857647553086) * MODEL1_texOff(vec2(0,-1));
res += mat4(-0.264604419469833,0.032743465155363,0.628456175327301,0.097257643938065,-0.622433006763458,-0.614998459815979,0.078249506652355,-0.375585198402405,-0.049800544977188,0.218813598155975,-0.184270009398460,0.079640448093414,0.420118182897568,0.283940643072128,-0.008088956587017,0.166217371821404) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.177001819014549,0.094190977513790,0.313199818134308,-0.281713396310806,0.157906755805016,0.323995858430862,0.149074703454971,0.053444307297468,-0.027710044756532,0.221993893384933,0.102811783552170,-0.080573044717312,-0.381665378808975,-0.415648251771927,0.005208140704781,-0.035224705934525) * MODEL1_texOff(vec2(0,1));
res += mat4(0.051158547401428,0.002146954648197,-0.049268815666437,0.031825598329306,0.088869236409664,-0.132959529757500,-0.007175734266639,0.034600790590048,-0.165914952754974,0.202996671199799,0.133798554539680,-0.110333718359470,-0.039128351956606,-0.137867808341980,0.034745678305626,-0.022830383852124) * MODEL1_texOff(vec2(1,-1));
res += mat4(0.015882214531302,0.056456770747900,0.157080486416817,0.003559379372746,0.120221234858036,0.121817030012608,-0.049230821430683,0.099017225205898,0.139703005552292,0.014502311125398,-0.325403273105621,-0.148130044341087,-0.144691303372383,-0.104704461991787,0.038895718753338,-0.152851730585098) * MODEL1_texOff(vec2(1,0));
res += mat4(0.018448153510690,0.067759312689304,0.047185041010380,-0.004144282545894,-0.185940578579903,0.108819991350174,0.166817322373390,-0.040483713150024,-0.272628068923950,0.007600578945130,0.057734631001949,-0.081094704568386,0.130883693695068,-0.176567748188972,-0.076457783579826,0.020530091598630) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.187702476978302,0.146642461419106,0.095342159271240,0.079136334359646,-0.159847721457481,0.101922824978828,-0.132589653134346,-0.121402673423290,-0.008095030672848,0.019558828324080,0.122447885572910,-0.071787551045418,-0.054333180189133,0.094360992312431,-0.139064416289330,0.079608663916588) * MODEL2_texOff(vec2(-1,-1));
res += mat4(0.164223238825798,0.042908478528261,-0.024620752781630,0.159062698483467,-0.231464400887489,-0.209349408745766,-0.066586382687092,0.022709894925356,-0.022399667650461,0.095181107521057,0.005225579719990,0.123775348067284,-0.135144829750061,0.194444522261620,0.071705758571625,-0.113792382180691) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.022888576611876,-0.260333091020584,-0.010151550173759,-0.130467817187309,0.110664732754230,0.027326421812177,0.062076434493065,0.071075968444347,-0.015328925102949,-0.077817566692829,0.056529078632593,-0.119522772729397,-0.071363449096680,0.023728350177407,0.022753251716495,0.049147814512253) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.007677302695811,-0.068313553929329,-0.313519805669785,-0.236538290977478,0.222488209605217,0.108305916190147,-0.421565443277359,-0.434387952089310,0.090327322483063,-0.024004114791751,0.201891362667084,0.113054551184177,-0.080177493393421,0.160275265574455,-0.016005489975214,-0.267599165439606) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.012392655946314,0.697900414466858,-0.130782991647720,-0.074487589299679,0.384765714406967,0.007967332378030,-0.337067037820816,-0.499505072832108,-0.323342025279999,0.223625347018242,-0.069742299616337,-0.285560488700867,0.004715683870018,0.160568937659264,0.166304320096970,0.349954783916473) * MODEL2_texOff(vec2(0,0));
res += mat4(0.043498400598764,-0.135480716824532,0.093041971325874,0.061841130256653,-0.138791739940643,-0.059405636042356,0.094599410891533,-0.103242456912994,0.120625950396061,0.023280601948500,0.078780226409435,0.065563373267651,0.047143742442131,-0.182964310050011,-0.055073570460081,0.011930952779949) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.168453350663185,0.009520797990263,-0.271044194698334,-0.109764993190765,0.082641541957855,-0.031330052763224,-0.101396463811398,0.134533315896988,-0.010418358258903,0.197260275483131,0.140694826841354,-0.153825581073761,0.004902577493340,-0.043561775237322,0.025458959862590,0.025143846869469) * MODEL2_texOff(vec2(1,-1));
res += mat4(-0.171674445271492,-0.035882964730263,-0.108540758490562,-0.276634722948074,0.050246488302946,-0.089902862906456,-0.284082651138306,0.147360667586327,0.181752488017082,-0.290021598339081,-0.357577234506607,0.084073886275291,0.110703073441982,0.061748102307320,0.048284482210875,0.021784478798509) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.271500021219254,-0.130357921123505,0.099794887006283,-0.175698235630989,0.026717511937022,0.018653361126781,-0.012895764783025,0.113643459975719,-0.087737858295441,0.209499195218086,0.138739645481110,-0.024584885686636,-0.105570726096630,-0.060663718730211,-0.055356651544571,-0.036255832761526) * MODEL2_texOff(vec2(1,1));
res += mat4(-0.037355452775955,-0.307290792465210,-0.015271936543286,0.217389330267906,-0.110057003796101,-0.058851487934589,0.038377184420824,-0.084945440292358,0.058773010969162,-0.027828764170408,-0.030257433652878,0.171084463596344,0.097890868782997,-0.076242156326771,-0.192440330982208,-0.187674924731255) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.095211371779442,0.206863194704056,-0.071454703807831,0.133783265948296,0.035449169576168,0.160893827676773,-0.021261351183057,0.177255094051361,0.282555848360062,-0.147755891084671,0.019845152273774,0.100613012909889,-0.109066575765610,-0.136637851595879,-0.130935981869698,-0.047042153775692) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.009076641872525,-0.002245186129585,-0.031711492687464,0.204567328095436,-0.035666424781084,-0.077334649860859,0.017212422564626,-0.139262512326241,-0.023075163364410,-0.178999885916710,-0.007856816053391,0.009549139998853,-0.088070839643478,0.061350159347057,-0.114200197160244,-0.061981722712517) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.067451149225235,0.033980052918196,0.026470623910427,0.216741845011711,0.147798418998718,-0.042373966425657,0.049585964530706,0.177947744727135,0.177061095833778,-0.196618288755417,0.207453534007072,0.388530135154724,-0.039932165294886,-0.119311928749084,0.276693880558014,0.288584738969803) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.081110209226608,-0.051466997712851,0.005824699997902,-0.294381469488144,-0.071600340306759,0.120296522974968,-0.199870869517326,-0.507014930248260,0.053358510136604,-0.179646715521812,-0.101332075893879,0.027463464066386,-0.142393976449966,-0.427341431379318,0.056349281221628,0.124743446707726) * MODEL3_texOff(vec2(0,0));
res += mat4(0.028446378186345,-0.007987855002284,-0.036524262279272,0.009800112806261,-0.198853537440300,-0.063518606126308,0.169890522956848,-0.088735051453114,0.298395097255707,-0.042677201330662,-0.032257575541735,0.195891872048378,0.120314836502075,0.106438152492046,-0.057070735841990,0.068095654249191) * MODEL3_texOff(vec2(0,1));
res += mat4(-0.073455922305584,0.069822445511818,-0.074855215847492,-0.203630208969116,-0.026005471125245,0.024760285392404,-0.116618931293488,-0.248793333768845,0.050100069493055,0.074501119554043,-0.120138995349407,-0.126788452267647,0.006635690573603,-0.007532379124314,0.207413449883461,-0.064296267926693) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.091543577611446,-0.158800721168518,-0.004023462068290,0.077514700591564,-0.154058352112770,-0.110945157706738,-0.126264631748199,0.068675458431244,0.006049270741642,-0.269271582365036,-0.187751486897469,0.032327003777027,0.054308123886585,0.069850966334343,0.065876685082912,-0.017896672710776) * MODEL3_texOff(vec2(1,0));
res += mat4(0.128384590148926,0.089738421142101,0.054800216108561,0.040679831057787,0.085864692926407,0.078148931264877,0.227838188409805,-0.015418293885887,0.097114548087120,0.040258560329676,0.038953144103289,0.103215016424656,0.019315835088491,-0.024987936019897,-0.018462106585503,0.067408762872219) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.078215070068836,0.057502217590809,-0.028164681047201,0.031114334240556) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.152160182595253,-0.026756431907415,-0.416849851608276,0.009778821840882);
res += mat4(-0.075192302465439,0.002506988588721,0.111851938068867,-0.071195401251316,0.019575253129005,0.036667846143246,0.034633316099644,-0.110667832195759,-0.025532415136695,0.090919785201550,0.055174801498652,0.040554746985435,-0.068717643618584,0.024386301636696,-0.062390435487032,-0.128788575530052) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.029063319787383,0.176642179489136,0.184669524431229,-0.089535973966122,-0.116280503571033,0.187438607215881,-0.027626799419522,-0.038971163332462,0.083455085754395,-0.056643497198820,-0.132786735892296,0.028380883857608,-0.100278466939926,-0.058935347944498,-0.284803390502930,0.130396917462349) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.181365355849266,-0.064061418175697,-0.013950654305518,0.176350265741348,-0.073997274041176,0.008746325969696,0.037459883838892,-0.126221925020218,-0.026002826169133,-0.042015206068754,-0.061027940362692,0.022268265485764,0.042767528444529,0.021048314869404,-0.171829015016556,-0.012071206234396) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.152644068002701,-0.038681264966726,-0.047286342829466,-0.412081897258759,0.087961256504059,0.327628880739212,0.166310131549835,0.164658576250076,-0.123400315642357,-0.079656824469566,-0.039863888174295,-0.209971100091934,-0.124100409448147,-0.038602046668530,-0.037466272711754,-0.022282054647803) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.270873993635178,-0.044878218322992,-0.126950770616531,0.465281575918198,-0.094196557998657,-0.407038062810898,0.482139974832535,0.055179417133331,0.001544489874505,0.127578675746918,-0.000654546078295,0.214457526803017,0.148684889078140,-0.276884973049164,-0.013854533433914,0.495821386575699) * MODEL1_texOff(vec2(0,0));
res += mat4(0.557448029518127,0.197607636451721,0.020523618906736,-0.373387604951859,0.067913293838501,0.036727868020535,0.235934123396873,-0.047600746154785,-0.151286154985428,0.126191496849060,0.334239035844803,-0.473635166883469,0.333113104104996,0.048832587897778,-0.161084368824959,-0.050109408795834) * MODEL1_texOff(vec2(0,1));
res += mat4(0.034161157906055,-0.014326856471598,-0.081276118755341,0.066158637404442,0.171137660741806,0.110358759760857,-0.065433941781521,0.092336632311344,-0.214449673891068,-0.066224217414856,0.049980290234089,-0.082783222198486,0.017627578228712,0.105017364025116,0.134009927511215,-0.031710408627987) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.086004272103310,0.186851248145103,0.159334391355515,0.178343653678894,-0.021374436095357,0.103495486080647,0.057187151163816,-0.219606682658195,0.175944790244102,0.019452925771475,-0.012093119323254,0.017286157235503,-0.002206732053310,0.048772834241390,0.113432712852955,0.085168473422527) * MODEL1_texOff(vec2(1,0));
res += mat4(0.135030373930931,0.089270621538162,0.018693748861551,-0.069846682250500,-0.118678651750088,-0.059222698211670,-0.055468179285526,-0.021203342825174,-0.480953484773636,0.011690396815538,-0.026879688724875,-0.116869933903217,0.045860216021538,0.042684588581324,0.150073066353798,0.169843465089798) * MODEL1_texOff(vec2(1,1));
res += mat4(0.093757674098015,-0.071634799242020,-0.086393885314465,0.133949249982834,-0.146930769085884,-0.005202890839428,0.280852198600769,-0.142573580145836,-0.004011311568320,0.044301640242338,-0.042596891522408,0.041054248809814,0.168683350086212,-0.122314020991325,-0.126581341028214,-0.012867605313659) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.015547215007246,-0.257607549428940,-0.167664408683777,0.192063316702843,0.120917029678822,0.145066857337952,0.234682530164719,-0.039301134645939,-0.000354564253939,0.029017563909292,-0.049398086965084,0.047771863639355,-0.190450817346573,-0.481989920139313,-0.571624636650085,0.025602094829082) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.066152177751064,0.032530672848225,-0.184422388672829,-0.114490263164043,0.039920493960381,0.019733214750886,0.121782340109348,0.040441572666168,0.105064511299133,0.004246528260410,-0.005429013166577,0.013845887035131,0.200739011168480,-0.034597929567099,-0.049403857439756,-0.081632845103741) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.321829974651337,0.170384481549263,0.162503838539124,0.279706031084061,-0.241277351975441,0.010599682107568,0.034229595214128,-0.024644186720252,-0.049200251698494,0.047318890690804,-0.110437795519829,-0.029557205736637,0.098534949123859,0.097634457051754,0.130012124776840,0.086835704743862) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.253132045269012,0.221507519483566,0.526459634304047,-0.406148195266724,0.381051927804947,-0.131470516324043,0.118928097188473,0.202700138092041,-0.137251242995262,-0.084159888327122,-0.119581773877144,0.115483187139034,0.088773086667061,0.101202227175236,0.138187229633331,-0.068072907626629) * MODEL2_texOff(vec2(0,0));
res += mat4(0.138138800859451,-0.033363603055477,0.147016644477844,0.157108813524246,-0.552419066429138,0.049384586513042,0.067524224519730,-0.037588275969028,0.265874445438385,0.004441762808710,-0.042511720210314,0.003066194709390,-0.038889646530151,-0.138377889990807,0.183360949158669,-0.032838724553585) * MODEL2_texOff(vec2(0,1));
res += mat4(0.013224966824055,-0.041674662381411,-0.016441861167550,-0.095019072294235,-0.065523184835911,0.039705507457256,-0.022029379382730,0.021327583119273,-0.081632412970066,0.068426631391048,0.028667584061623,-0.270970612764359,0.103601202368736,-0.024398250505328,-0.074465863406658,-0.041263051331043) * MODEL2_texOff(vec2(1,-1));
res += mat4(-0.073660016059875,-0.166715160012245,-0.236652523279190,-0.050552658736706,-0.091354720294476,0.074309527873993,0.077872343361378,0.013711419887841,-0.099462337791920,-0.133508518338203,-0.276597827672958,0.053540688008070,0.030523078516126,-0.040389098227024,-0.102654822170734,-0.066291436553001) * MODEL2_texOff(vec2(1,0));
res += mat4(0.100102514028549,-0.075546406209469,-0.194399327039719,0.029805127531290,0.052459437400103,0.039595536887646,0.040005017071962,-0.027658794075251,0.069937378168106,0.030524695292115,-0.100271984934807,0.346702963113785,-0.028683355078101,-0.045080315321684,-0.064723357558250,-0.059949126094580) * MODEL2_texOff(vec2(1,1));
res += mat4(0.017284782603383,-0.196576029062271,0.023973913863301,0.109769172966480,0.080621995031834,0.173750460147858,0.104632161557674,0.038375906646252,0.026364760473371,0.027533089742064,-0.127385318279266,0.081669457256794,0.025248466059566,0.024707496166229,-0.064748831093311,-0.038404267281294) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.014519054442644,0.167291074991226,0.324920445680618,-0.243680402636528,-0.239519044756889,-0.126881599426270,0.378175914287567,-0.063503079116344,0.002208871999756,-0.211813554167747,-0.175731688737869,0.101755686104298,-0.027966393157840,0.062224693596363,0.171685397624969,-0.034181639552116) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.063697025179863,0.017539745196700,0.238743245601654,-0.023821385577321,-0.188080057501793,-0.046814002096653,0.085865199565887,0.038928456604481,-0.017228754237294,-0.026285048574209,-0.223970562219620,-0.106651164591312,-0.158163323998451,0.031309705227613,-0.040542691946030,0.027759017422795) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.135423675179482,0.113685995340347,-0.035691570490599,0.256350100040436,-0.170992359519005,-0.128158211708069,0.005842621903867,-0.272240757942200,0.068337962031364,-0.001348178600892,0.088792651891708,-0.097186483442783,0.223212108016014,-0.043918352574110,-0.144063591957092,0.200282305479050) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.106655508279800,-0.369063913822174,-0.091913037002087,-0.062069658190012,0.051407750695944,0.436837106943130,0.380089551210403,0.323323696851730,0.022955307736993,0.340425610542297,0.617687821388245,-0.094293445348740,-0.217128783464432,0.034292038530111,-0.014571607112885,-0.105230778455734) * MODEL3_texOff(vec2(0,0));
res += mat4(0.114071078598499,0.047682385891676,-0.021711444482207,0.062141992151737,-0.141931027173996,0.059807684272528,-0.062468029558659,-0.168630257248878,0.083209149539471,-0.065674662590027,0.083704836666584,-0.029470710083842,-0.350365191698074,-0.066410362720490,-0.107359774410725,-0.136333867907524) * MODEL3_texOff(vec2(0,1));
res += mat4(0.067013964056969,0.108718208968639,-0.183945074677467,0.144387036561966,-0.093339756131172,-0.145266562700272,-0.103902071714401,-0.039732608944178,0.043277580291033,-0.060326863080263,0.207454979419708,-0.099822320044041,0.064245760440826,-0.009429754689336,-0.003420177847147,-0.083805046975613) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.239938899874687,0.269012957811356,0.064261302351952,0.082237228751183,0.064703784883022,-0.272791355848312,-0.088355794548988,-0.168223708868027,0.062259763479233,-0.196530267596245,-0.197150051593781,-0.240487650036812,-0.007502237800509,-0.060114122927189,-0.284141808748245,-0.002552215475589) * MODEL3_texOff(vec2(1,0));
res += mat4(0.283576369285583,0.099785394966602,0.008599950000644,-0.027566298842430,-0.081964761018753,0.008043839596212,0.044027473777533,0.044910527765751,-0.120450362563133,0.017420709133148,0.091501742601395,0.005042319186032,0.203840523958206,0.001397473621182,-0.098688229918480,0.017960056662560) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.014883687719703,0.984510719776154,0.028332497924566,0.629801273345947) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL1
//!BIND MODEL2
//!BIND MODEL3
//!SAVE MODEL6
//!DESC [AiUpscale_Fast_3x_Photo_RT] mapping 4_3

vec4 hook()
{

#if (SHARP == 0)
vec4 res = vec4(-0.242779642343521,-0.276005387306213,-0.176369965076447,-0.027009928599000);
res += mat4(0.028176957741380,-0.202356979250908,0.027091579511762,-0.021592762321234,-0.045143716037273,-0.130790278315544,0.034171283245087,-0.013375353999436,0.064412489533424,-0.098310813307762,-0.071150608360767,-0.064212478697300,-0.010109151713550,-0.004325790796429,0.051153585314751,-0.002773006446660) * MODEL1_texOff(vec2(-1,-1));
res += mat4(-0.148269668221474,0.224302440881729,0.087969258427620,-0.191205278038979,0.218635797500610,0.109201997518539,-0.007897755131125,0.106224507093430,-0.011756725609303,-0.322176635265350,-0.094330482184887,-0.231700122356415,0.192029073834419,0.154950022697449,-0.157842010259628,0.394931823015213) * MODEL1_texOff(vec2(-1,0));
res += mat4(-0.088583387434483,0.143461793661118,-0.081267870962620,0.055444471538067,0.148200407624245,0.078015528619289,-0.096139997243881,0.004610316827893,-0.083713389933109,-0.031342118978500,0.097581617534161,-0.151168465614319,0.123228080570698,0.049444910138845,0.140994787216187,-0.003714134916663) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.011478206142783,-0.093320302665234,-0.129170507192612,0.030021622776985,-0.156480193138123,0.015324308536947,-0.199607744812965,-0.012004707008600,-0.007833653129637,0.142669066786766,0.135498598217964,-0.168523058295250,0.030137535184622,-0.026645593345165,-0.027902880683541,-0.018342111259699) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.071794211864471,0.521683871746063,-0.100727722048759,0.153813257813454,-0.124286018311977,-0.637502968311310,-0.300528407096863,0.183323934674263,0.309980809688568,-0.308118224143982,-0.112662918865681,0.054355125874281,0.149703383445740,0.348669201135635,0.022954594343901,-0.308290094137192) * MODEL1_texOff(vec2(0,0));
res += mat4(0.015888998284936,0.161965265870094,0.058875713497400,-0.119478143751621,-0.112787313759327,0.367001295089722,0.160201668739319,0.044671785086393,0.065927900373936,0.249237835407257,-0.082059688866138,0.001633696490899,0.307385683059692,-0.004219124559313,0.019957607612014,0.014115562662482) * MODEL1_texOff(vec2(0,1));
res += mat4(0.005351522937417,-0.042598243802786,-0.043365571647882,0.031738385558128,0.039718545973301,-0.112972579896450,0.147926062345505,-0.020409027114511,-0.042498040944338,-0.014506561681628,0.042551048099995,-0.037846539169550,-0.067045003175735,0.074828967452049,0.030539443716407,0.008438353426754) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.100014902651310,0.082426138222218,0.009573446586728,-0.107037112116814,0.109789527952671,-0.257982969284058,0.218022406101227,-0.080353945493698,-0.121626831591129,-0.387338876724243,0.147965103387833,-0.368805736303329,-0.073808915913105,0.049668334424496,0.045110210776329,-0.019978892058134) * MODEL1_texOff(vec2(1,0));
res += mat4(0.064723871648312,0.097515314817429,-0.026244249194860,-0.020651273429394,0.200371399521828,0.248540103435516,-0.035617094486952,0.005532622337341,-0.006760220043361,-0.044725719839334,0.062164850533009,-0.139631688594818,-0.106431476771832,-0.191044583916664,-0.002002764958888,-0.111951924860477) * MODEL1_texOff(vec2(1,1));
res += mat4(-0.086451694369316,-0.069216832518578,0.023722803220153,-0.072476550936699,-0.032632332295179,0.045624628663063,0.001524765044451,0.065103709697723,-0.136243358254433,0.131378248333931,0.033660791814327,-0.197075679898262,0.052269641309977,-0.211024254560471,0.141025751829147,0.039482232183218) * MODEL2_texOff(vec2(-1,-1));
res += mat4(0.093415319919586,0.211750626564026,-0.439172118902206,0.111832782626152,0.079973213374615,-0.110160380601883,-0.352788180112839,-0.079950302839279,-0.116921454668045,0.097429104149342,-0.128216952085495,0.037901852279902,0.323098629713058,0.283573687076569,0.535814225673676,0.029706031084061) * MODEL2_texOff(vec2(-1,0));
res += mat4(0.003659279085696,-0.046860799193382,-0.016276234760880,-0.094297967851162,0.030787406489253,0.141047298908234,-0.074732482433319,0.024608163163066,-0.015727721154690,-0.008455368690193,-0.078549638390541,0.009482044726610,0.125254243612289,-0.097698934376240,0.199750363826752,-0.022266151383519) * MODEL2_texOff(vec2(-1,1));
res += mat4(0.021787675097585,-0.429304391145706,0.033119384199381,-0.129749402403831,0.078005418181419,0.079372495412827,-0.249307230114937,0.149017393589020,0.088010139763355,0.379603713750839,-0.369412988424301,0.065011493861675,0.122044481337070,-0.158213332295418,0.014013015665114,0.044809799641371) * MODEL2_texOff(vec2(0,-1));
res += mat4(-0.472218602895737,0.157388195395470,-0.029793802648783,-0.218985110521317,-0.318528711795807,0.160674169659615,-1.011772274971008,0.310449779033661,-0.240998968482018,-0.198229834437370,0.124305322766304,-0.235659092664719,0.708503305912018,0.331075966358185,-0.400379270315170,0.400322437286377) * MODEL2_texOff(vec2(0,0));
res += mat4(0.046906616538763,0.119960896670818,-0.011361366137862,0.020844509825110,0.159454226493835,0.099337540566921,-0.140300795435905,-0.029171792790294,-0.110041081905365,0.188231706619263,0.023175770416856,-0.029269775375724,0.048601146787405,-0.137636601924896,-0.093166440725327,0.105709262192249) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.035066604614258,-0.101611658930779,-0.156031847000122,0.151883125305176,0.054389446973801,0.086220413446426,0.123415976762772,0.004050017800182,-0.287152290344238,0.095358431339264,0.011246725916862,-0.161954656243324,-0.086415432393551,0.096371866762638,-0.052077304571867,-0.027045167982578) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.020511357113719,0.195074915885925,-0.125129833817482,0.138056576251984,-0.007329578977078,-0.000794617575593,0.172383159399033,-0.126460239291191,0.064504176378250,-0.066352099180222,-0.154797419905663,0.117092028260231,-0.109035849571228,-0.038287732750177,0.126642554998398,-0.228938996791840) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.057010821998119,-0.004721703007817,-0.188690736889839,0.003749987343326,0.169672966003418,-0.006503131240606,0.148470386862755,0.007573007140309,0.070868767797947,0.251416325569153,0.013230911456048,0.034251198172569,0.062321357429028,0.023365203291178,-0.031993605196476,-0.085823036730289) * MODEL2_texOff(vec2(1,1));
res += mat4(0.223391115665436,0.014782916754484,0.239245504140854,0.032156217843294,-0.080702468752861,-0.106028787791729,0.065327495336533,0.049844928085804,-0.064058065414429,-0.035791885107756,-0.151980221271515,0.192029565572739,0.172183141112328,-0.040582008659840,-0.066264592111111,0.137677267193794) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.067262463271618,-0.002212635707110,0.348590850830078,0.477635085582733,0.215393438935280,0.151167988777161,-0.191567569971085,0.459468364715576,0.123492628335953,-0.029660979285836,-0.247359216213226,0.129448935389519,0.201288416981697,-0.397064596414566,0.015773542225361,0.005384485702962) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.295904636383057,-0.012437467463315,0.098567731678486,0.198971495032310,0.037132047116756,0.030928418040276,0.033144641667604,0.090383820235729,-0.084885373711586,-0.046111281961203,-0.025736445561051,-0.123717971146107,0.071523353457451,-0.089797370135784,-0.015525771304965,-0.008467625826597) * MODEL3_texOff(vec2(-1,1));
res += mat4(0.051205772906542,0.111012607812881,0.103437304496765,-0.025372074916959,-0.003777542617172,0.101613759994507,-0.083014540374279,0.022628836333752,-0.091967917978764,0.287957578897476,0.016792418435216,-0.132147163152695,-0.008641915395856,0.493081718683243,0.283319383859634,-0.040563795715570) * MODEL3_texOff(vec2(0,-1));
res += mat4(-0.420171588659286,-0.152525112032890,0.449847638607025,-0.434586852788925,-0.643815517425537,-0.157268241047859,0.328108131885529,-0.173677623271942,-0.259259492158890,-0.118664495646954,0.180002868175507,-0.272311598062515,0.106132939457893,-0.391157329082489,-0.002724328543991,0.102457500994205) * MODEL3_texOff(vec2(0,0));
res += mat4(-0.134640961885452,0.045608196407557,-0.002511488739401,-0.116548337042332,0.005108258221298,0.179065525531769,0.143025323748589,0.044754955917597,-0.121130540966988,-0.155048787593842,-0.160288125276566,0.061716403812170,-0.035790439695120,-0.055901587009430,0.026578387245536,-0.015553687699139) * MODEL3_texOff(vec2(0,1));
res += mat4(0.031914133578539,-0.021400675177574,-0.065595231950283,0.041319929063320,0.063844524323940,-0.150348514318466,0.018727403134108,0.066694125533104,-0.064544290304184,-0.072624497115612,-0.179791957139969,0.091036491096020,0.046109694987535,0.038479652255774,-0.045757450163364,-0.027462890371680) * MODEL3_texOff(vec2(1,-1));
res += mat4(0.162386789917946,-0.036081887781620,-0.178703591227531,0.340825974941254,0.332529932260513,0.003730861702934,-0.143993780016899,0.504352569580078,-0.075686380267143,-0.252792358398438,-0.153667643666267,0.258649528026581,-0.077237680554390,-0.126877307891846,0.144799485802650,-0.101267546415329) * MODEL3_texOff(vec2(1,0));
res += mat4(-0.016270427033305,0.061524804681540,0.085610993206501,0.100676096975803,0.113130584359169,0.087843574583530,-0.021130321547389,0.275163143873215,-0.162510678172112,0.057133767753839,-0.149977520108223,-0.092855080962181,0.041800968348980,0.003273069858551,0.048747044056654,-0.001756370300427) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(0.036462541669607,0.029196418821812,0.000038159036194,0.311803668737411) * min(res, vec4(0.0));
#elif (SHARP == 1)
vec4 res = vec4(-0.225672781467438,-0.300163030624390,-0.396252512931824,-0.262797027826309);
res += mat4(0.024094356223941,0.044324122369289,0.130802422761917,-0.110334001481533,-0.212398320436478,-0.254076331853867,0.052192185074091,-0.133344039320946,0.124098412692547,0.003675144165754,0.051156580448151,-0.096589326858521,-0.032679006457329,-0.024573061615229,-0.036935795098543,-0.027147511020303) * MODEL1_texOff(vec2(-1,-1));
res += mat4(0.001233694842085,0.260168462991714,-0.011107275262475,0.183693751692772,0.146195098757744,-0.007131573744118,-0.001803539926186,-0.070496127009392,0.164004415273666,0.052033461630344,-0.087493561208248,-0.088907584547997,-0.308893769979477,-0.251235753297806,-0.224031299352646,-0.012589284218848) * MODEL1_texOff(vec2(-1,0));
res += mat4(0.018669400364161,-0.097991913557053,-0.031177401542664,-0.080838233232498,0.072640009224415,0.083333030343056,0.017485737800598,-0.055007848888636,0.091185420751572,0.167544230818748,0.003088680095971,0.061151351779699,-0.027276989072561,0.255967676639557,-0.209820643067360,0.007504584267735) * MODEL1_texOff(vec2(-1,1));
res += mat4(-0.094385311007500,-0.397068977355957,-0.125813603401184,-0.010839691385627,0.328629851341248,0.183951675891876,0.292634874582291,0.137734264135361,-0.059264715760946,-0.088845744729042,-0.131597459316254,-0.040863495320082,-0.036113053560257,-0.083037756383419,0.025553110986948,-0.177983716130257) * MODEL1_texOff(vec2(0,-1));
res += mat4(0.340363472700119,0.618553102016449,0.015679171308875,0.271213591098785,0.388469129800797,-0.493689954280853,0.541209340095520,-0.073058478534222,-0.220284938812256,-0.124031245708466,0.031231705099344,0.153585389256477,0.055848225951195,0.110977761447430,0.052948087453842,0.600393593311310) * MODEL1_texOff(vec2(0,0));
res += mat4(-0.098862729966640,0.490428060293198,-0.052830919623375,-0.151480734348297,0.073426455259323,-0.075032010674477,0.236805438995361,0.001420402666554,-0.003558053867891,0.254118084907532,0.143735677003860,-0.286443442106247,-0.003410321660340,0.118860244750977,-0.114129938185215,-0.237991333007813) * MODEL1_texOff(vec2(0,1));
res += mat4(-0.001442842185497,-0.007874949835241,-0.088559232652187,-0.130756944417953,-0.082926660776138,0.092903122305870,-0.220464348793030,0.082664266228676,0.030122239142656,-0.250611931085587,0.089062593877316,-0.223058626055717,0.168563991785049,0.088299393653870,0.061895538121462,0.140354156494141) * MODEL1_texOff(vec2(1,-1));
res += mat4(-0.123799070715904,0.104319870471954,0.134304136037827,0.121223688125610,0.048888552933931,-0.095380261540413,-0.172768309712410,-0.106757320463657,0.070672988891602,0.385028719902039,0.029956083744764,0.130694881081581,0.073094941675663,0.064421288669109,-0.058085922151804,0.129021003842354) * MODEL1_texOff(vec2(1,0));
res += mat4(-0.083939515054226,0.168913990259171,0.037900175899267,-0.126449525356293,0.088220462203026,-0.130002722144127,-0.035677161067724,-0.075021743774414,0.169117689132690,0.048047777265310,0.021207384765148,0.050549518316984,-0.099215567111969,-0.018787732347846,0.043480351567268,0.067237026989460) * MODEL1_texOff(vec2(1,1));
res += mat4(0.080934241414070,-0.037944465875626,-0.055992208421230,-0.085734412074089,0.001380653702654,0.056045468896627,0.226963862776756,0.114892907440662,-0.117646098136902,0.055829640477896,-0.043110735714436,0.010979828424752,0.253547161817551,0.095242276787758,0.025369103997946,0.140441656112671) * MODEL2_texOff(vec2(-1,-1));
res += mat4(-0.114569529891014,0.055727254599333,-0.012863051146269,-0.279639303684235,0.215067207813263,-0.241427659988403,0.201216965913773,-0.040859930217266,-0.005792641546577,0.047899518162012,-0.058543059974909,0.221951335668564,0.518694102764130,0.095068201422691,0.051701396703720,-0.227468252182007) * MODEL2_texOff(vec2(-1,0));
res += mat4(-0.148803785443306,-0.058654733002186,-0.079285003244877,-0.046179722994566,0.159564658999443,0.165066123008728,0.045872487127781,-0.057616624981165,0.017807569354773,-0.027600066736341,-0.004717567469925,0.118624486029148,0.170493692159653,0.046893056482077,0.017734194174409,0.077358260750771) * MODEL2_texOff(vec2(-1,1));
res += mat4(-0.018313096836209,0.064443618059158,0.142914563417435,0.065867498517036,0.219462245702744,-0.051213767379522,-0.067957825958729,-0.126881256699562,0.044432587921619,0.123230889439583,-0.101528912782669,0.070153698325157,-0.165117412805557,0.144937410950661,0.181332841515541,-0.175175771117210) * MODEL2_texOff(vec2(0,-1));
res += mat4(0.076076917350292,0.347720295190811,0.477120846509933,-0.241303190588951,0.557919919490814,0.039075944572687,-0.722079217433929,-0.171400502324104,-0.068554230034351,0.022628221660852,-0.107178203761578,0.307841390371323,-0.266244113445282,0.056186459958553,0.315030843019485,-0.220766425132751) * MODEL2_texOff(vec2(0,0));
res += mat4(-0.039846185594797,-0.234582424163818,0.132840201258659,0.172987774014473,0.098126150667667,0.114486232399940,-0.101249456405640,-0.015883920714259,-0.065421342849731,-0.161139175295830,-0.018875909969211,-0.027431754395366,0.068159423768520,-0.130292251706123,0.124297782778740,0.012818584218621) * MODEL2_texOff(vec2(0,1));
res += mat4(-0.016379376873374,0.018077462911606,-0.008154409937561,-0.032949578016996,0.068125046789646,0.034674856811762,0.043289415538311,0.052573073655367,-0.055402897298336,0.036831021308899,-0.017265820875764,0.353071361780167,-0.079474255442619,0.064019627869129,-0.083859525620937,-0.049731682986021) * MODEL2_texOff(vec2(1,-1));
res += mat4(0.105899654328823,-0.018571522086859,-0.216795250773430,-0.059744615107775,-0.116570450365543,-0.139889836311340,0.180710956454277,-0.026783209294081,-0.121883451938629,-0.061202388256788,-0.192611247301102,-0.289971381425858,0.056304067373276,0.151265263557434,-0.052921261638403,-0.036346279084682) * MODEL2_texOff(vec2(1,0));
res += mat4(-0.037765923887491,0.032464098185301,-0.117912486195564,0.062670446932316,0.015156945213675,0.121510155498981,0.070937909185886,-0.023347169160843,-0.041439346969128,-0.067486599087715,-0.030259359627962,0.295901119709015,-0.070939838886261,0.045575365424156,-0.089301139116287,0.065570279955864) * MODEL2_texOff(vec2(1,1));
res += mat4(0.103620558977127,0.059518400579691,0.138231009244919,0.088492974638939,0.060421589761972,-0.040838815271854,0.150078713893890,0.032629523426294,-0.003904682118446,0.089177489280701,-0.116705432534218,-0.028073215857148,-0.197795465588570,-0.104250811040401,-0.029342772439122,-0.053272817283869) * MODEL3_texOff(vec2(-1,-1));
res += mat4(0.206655010581017,-0.152709662914276,0.255455315113068,0.370004653930664,0.028347797691822,-0.306487292051315,0.314128458499908,-0.023892356082797,0.106383673846722,-0.036987893283367,0.133877247571945,-0.119953595101833,-0.821930229663849,-0.131165370345116,0.254149138927460,-0.348232209682465) * MODEL3_texOff(vec2(-1,0));
res += mat4(0.200820818543434,0.049504928290844,0.246064290404320,-0.178467258810997,-0.034375973045826,-0.004696091637015,0.034826796501875,-0.069210208952427,-0.070737704634666,-0.095202244818211,-0.122762337327003,-0.012484905309975,-0.030837425962090,0.095253661274910,-0.041585531085730,-0.080693848431110) * MODEL3_texOff(vec2(-1,1));
res += mat4(-0.249001711606979,0.040732614696026,-0.181190103292465,-0.116319328546524,-0.153247117996216,-0.260532736778259,0.017910717055202,-0.001759567763656,-0.078249163925648,0.042789727449417,0.110152535140514,-0.275579899549484,-0.019955815747380,0.194423839449883,-0.141882061958313,0.440686076879501) * MODEL3_texOff(vec2(0,-1));
res += mat4(0.003304263111204,0.089877188205719,-0.175134018063545,0.051939237862825,-0.230384349822998,-0.110360085964203,0.265037477016449,0.355355829000473,-0.351733207702637,-0.007097348570824,0.259018003940582,0.260530143976212,-0.390738725662231,-0.153568074107170,-0.121252693235874,-0.370684534311295) * MODEL3_texOff(vec2(0,0));
res += mat4(0.018216246739030,0.020573293790221,0.044831540435553,0.017211157828569,-0.144169241189957,0.108993075788021,-0.001102637383156,-0.115062691271305,-0.166094109416008,-0.036220349371433,-0.037326138466597,-0.164259225130081,0.013125807978213,-0.246870443224907,-0.035166203975677,-0.151022642850876) * MODEL3_texOff(vec2(0,1));
res += mat4(0.058886647224426,0.166763216257095,-0.053876809775829,0.179607823491096,0.110791563987732,-0.122368067502975,-0.131371781229973,-0.000396057323087,0.243126377463341,0.045701507478952,0.206471487879753,-0.001998550957069,-0.192874133586884,0.142184287309647,0.018703805282712,-0.011983067728579) * MODEL3_texOff(vec2(1,-1));
res += mat4(-0.003282843623310,-0.198985934257507,0.117794431746006,-0.109299063682556,0.193727105855942,-0.068659603595734,-0.148757398128510,-0.038700625300407,0.270536154508591,0.114593409001827,-0.183356136083603,-0.102701857686043,0.024314153939486,-0.218918204307556,0.089856870472431,-0.170942813158035) * MODEL3_texOff(vec2(1,0));
res += mat4(0.039314474910498,0.115172863006592,-0.069026410579681,0.035601835697889,0.051106858998537,-0.111774794757366,0.014032561331987,0.020852265879512,0.148936852812767,-0.177075654268265,0.180729597806931,0.087209217250347,0.001844082726166,0.028031680732965,0.042754236608744,0.045809261500835) * MODEL3_texOff(vec2(1,1));
res = max(res, vec4(0.0)) + vec4(-0.006301000248641,-0.022777553647757,0.001287833671086,-0.009055252186954) * min(res, vec4(0.0));
#endif

return res;
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE SUBCONV1
//!DESC [AiUpscale_Fast_3x_Photo_RT] sub-pixel convolution 1

vec4 hook()
{

#if (SHARP == 0)
vec3 res = vec3(0.000237816871959,-0.000092172274890,-0.001308773644269);
res += mat4x3(0.009713141247630,-0.005392002407461,-0.001035043154843,0.004919336177409,-0.004072759300470,-0.006102818064392,0.014190722256899,0.012532372027636,0.004342485219240,0.020857714116573,0.010085181333125,0.006667846813798) * MODEL4_texOff(vec2(-1,-1));
res += mat4x3(-0.011654947884381,-0.011331708170474,0.019336508587003,-0.014250456355512,0.002616917481646,0.012133308686316,-0.003316080663353,-0.009403959847987,0.000640871992800,0.020391607657075,0.041912533342838,0.038342602550983) * MODEL4_texOff(vec2(-1,0));
res += mat4x3(-0.003327449783683,-0.001367975841276,0.005476046819240,0.008752866648138,0.008445577695966,-0.008453367277980,0.002661844482645,0.006959984544665,0.006447049789131,0.002386907581240,-0.001671880483627,-0.000988960382529) * MODEL4_texOff(vec2(-1,1));
res += mat4x3(-0.012790971435606,0.004291279241443,0.005303846672177,0.010077487677336,-0.011094763875008,-0.012294118292630,0.002195897046477,0.008886838331819,0.004243022762239,0.008637764491141,0.003523113904521,0.000613739714026) * MODEL4_texOff(vec2(0,-1));
res += mat4x3(0.064210087060928,-0.001663877046667,-0.040463205426931,-0.036529701203108,0.005805422551930,0.032603565603495,-0.014981550164521,-0.031331405043602,-0.021744001656771,-0.018107373267412,-0.007723856717348,0.007751089055091) * MODEL4_texOff(vec2(0,0));
res += mat4x3(-0.003176284953952,-0.032226983457804,0.010495533235371,0.011813696473837,0.015256982296705,-0.015928160399199,0.005333475302905,0.011951401829720,0.007058867253363,-0.002300776541233,-0.005774551071227,-0.012985592707992) * MODEL4_texOff(vec2(0,1));
res += mat4x3(0.003855344839394,0.003388680983335,0.002794428495690,-0.001719924155623,0.001604313030839,0.001970923738554,0.004770012106746,0.000414254842326,-0.000992742599919,-0.004207326099277,-0.003438411280513,-0.004125587642193) * MODEL4_texOff(vec2(1,-1));
res += mat4x3(-0.001081908820197,-0.010651409626007,0.001688294112682,0.003042537951842,-0.001810325426050,-0.004279735498130,0.004130147397518,0.002975119743496,0.005093299318105,0.002262038644403,0.001154028694145,-0.001689080614597) * MODEL4_texOff(vec2(1,0));
res += mat4x3(0.003972269129008,0.000666651176289,0.006153733469546,-0.001683550537564,-0.001892752130516,0.002203559037298,-0.001701669185422,0.000429896812420,0.004043375141919,-0.000433665351011,0.000120342810987,-0.000992753193714) * MODEL4_texOff(vec2(1,1));
res += mat4x3(0.015424529090524,0.002765539567918,0.000892751908395,-0.003136679762974,0.012734288349748,0.000972730515059,0.006875448394567,-0.002485346747562,-0.003146871458739,-0.004120220895857,-0.006374547723681,-0.002060329308733) * MODEL5_texOff(vec2(-1,-1));
res += mat4x3(-0.024693975225091,-0.011477183550596,0.019974740222096,0.015298931859434,-0.008274102583528,-0.027356849983335,0.009578441269696,-0.021444192156196,0.004851822275668,-0.025810766965151,-0.014720499515533,-0.004773470107466) * MODEL5_texOff(vec2(-1,0));
res += mat4x3(0.001642060000449,0.004618026781827,-0.003124321578071,-0.008404594846070,0.000602624844760,0.020321119576693,-0.006757516879588,-0.007855918258429,0.030753539875150,0.006647403817624,-0.003475120756775,-0.023337276652455) * MODEL5_texOff(vec2(-1,1));
res += mat4x3(-0.026004001498222,0.005240177270025,0.008147270418704,-0.010498761199415,0.002105817431584,0.003290860215202,0.001581730670296,-0.006288301199675,-0.001476131845266,0.000247685151407,0.000621753570158,-0.004153119865805) * MODEL5_texOff(vec2(0,-1));
res += mat4x3(0.045362714678049,0.008452297188342,-0.045804902911186,-0.040672883391380,0.038334969431162,0.021614583209157,-0.038677729666233,-0.009268713183701,0.024710223078728,-0.027828095480800,-0.041731808334589,-0.018436007201672) * MODEL5_texOff(vec2(0,0));
res += mat4x3(-0.000935348158237,-0.002902698703110,0.014495021663606,0.006806011311710,0.018014619126916,-0.032078895717859,-0.020352084189653,0.009391545318067,0.017321279272437,0.002349632559344,0.017996167764068,0.011531106196344) * MODEL5_texOff(vec2(0,1));
res += mat4x3(0.004325648304075,-0.000978808384389,-0.001514975330792,-0.008715564385056,-0.007840931415558,0.001563544035889,-0.002206787001342,-0.000184742501006,0.000994524918497,-0.001268360065296,-0.002882462926209,-0.000801275717095) * MODEL5_texOff(vec2(1,-1));
res += mat4x3(-0.005366553086787,0.001630357932299,0.009979587979615,0.003604915225878,0.006546939257532,0.000665971601848,0.003024284262210,0.003858428215608,-0.002263522241265,0.007222886197269,0.004308160860091,-0.001403552829288) * MODEL5_texOff(vec2(1,0));
res += mat4x3(-0.007714799139649,-0.004062938503921,-0.001873726374470,-0.001931777456775,-0.000463085481897,0.001710015232675,0.000222539660172,0.003551536472514,0.000019029130272,0.003103433875367,0.001949384924956,0.004794397857040) * MODEL5_texOff(vec2(1,1));
res += mat4x3(-0.013758804649115,-0.007757756393403,-0.002771246479824,-0.014402976259589,0.006002890411764,0.003049633465707,0.007912809029222,0.003409869503230,-0.000323841755744,0.002683549420908,-0.001797824166715,-0.003024370642379) * MODEL6_texOff(vec2(-1,-1));
res += mat4x3(0.010612894780934,-0.002257987624034,-0.014840752817690,0.017493393272161,0.014646257273853,-0.023646343499422,-0.009220143780112,0.002620571525767,0.009510306641459,0.007960857823491,0.010852779261768,0.009205226786435) * MODEL6_texOff(vec2(-1,0));
res += mat4x3(-0.006754284258932,-0.003721292829141,0.008940529078245,-0.003456585109234,-0.005628286395222,-0.006188477855176,0.000566034344956,-0.004622514359653,-0.009741582907736,0.000024623186619,0.002528969896957,0.005583733785897) * MODEL6_texOff(vec2(-1,1));
res += mat4x3(-0.031187977641821,-0.010306737385690,0.000095625291578,0.007146506104618,0.012286478653550,0.003900569863617,0.011534675955772,0.003966506104916,0.003000441472977,-0.014095621183515,-0.000720414856914,0.001061941497028) * MODEL6_texOff(vec2(0,-1));
res += mat4x3(-0.012374945916235,-0.041673857718706,-0.048965554684401,0.029964581131935,-0.012685102410614,-0.024781787768006,0.049209695309401,0.054078076034784,0.033430285751820,-0.025677051395178,-0.037439558655024,-0.034301135689020) * MODEL6_texOff(vec2(0,0));
res += mat4x3(-0.002356769051403,0.002557276515290,0.001189984846860,-0.003541540587321,-0.016096454113722,0.007330761756748,-0.001627514488064,-0.000099593962659,0.020800605416298,0.001718350686133,0.000079192985140,-0.007225214969367) * MODEL6_texOff(vec2(0,1));
res += mat4x3(0.004203802905977,0.002775713801384,0.001935743610375,-0.002436477458104,0.000149568848428,-0.000696958275512,-0.003365055890754,-0.002645772183314,0.002645400119945,0.008462440222502,0.000151683867443,-0.002444326411933) * MODEL6_texOff(vec2(1,-1));
res += mat4x3(-0.008605300448835,-0.006380101200193,-0.000643000297714,0.003702527377754,0.003269409760833,-0.003092777449638,0.007416743319482,0.004255146253854,-0.003777164034545,0.017267143353820,0.025976784527302,0.023704687133431) * MODEL6_texOff(vec2(1,0));
res += mat4x3(-0.002728701801971,-0.003675136016682,-0.006143151782453,0.000513983773999,0.002082107588649,-0.000111529850983,0.002869078656659,0.005766634363681,0.006587521638721,-0.000228325283388,0.000246363430051,0.005713545251638) * MODEL6_texOff(vec2(1,1));
#elif (SHARP == 1)
vec3 res = vec3(0.000452594103990,0.000169784136233,-0.000281347776763);
res += mat4x3(-0.001506092841737,-0.000096855037555,-0.002295243088156,-0.012324932962656,0.005142948590219,0.007042394019663,-0.001246715779416,0.006834803149104,0.006414757575840,-0.009881353005767,-0.008284660987556,0.002577976789325) * MODEL4_texOff(vec2(-1,-1));
res += mat4x3(0.008014036342502,-0.007303552702069,-0.008626122027636,-0.000920961610973,-0.027446283027530,-0.032735623419285,-0.030548231676221,-0.034228395670652,-0.020503453910351,-0.012815278023481,0.012163642793894,0.014568844810128) * MODEL4_texOff(vec2(-1,0));
res += mat4x3(-0.007040401455015,0.001567496336065,0.016225818544626,-0.000649454537779,0.005958382040262,0.010598263703287,0.006341653410345,0.001240980811417,-0.014853988774121,0.007803345099092,0.007161934394389,-0.009028603322804) * MODEL4_texOff(vec2(-1,1));
res += mat4x3(-0.018476128578186,-0.012814024463296,0.000046545519581,0.025535218417645,0.002680461853743,-0.001964513212442,-0.000187932644621,-0.003316253423691,-0.001863093348220,0.019564855843782,-0.024284776300192,-0.008528574369848) * MODEL4_texOff(vec2(0,-1));
res += mat4x3(-0.041184723377228,0.028762664645910,0.036739345639944,-0.039034873247147,0.001089742989279,0.037455420941114,0.020091738551855,0.024212718009949,0.017567025497556,-0.027746109291911,-0.028950391337276,0.042107023298740) * MODEL4_texOff(vec2(0,0));
res += mat4x3(0.008508899249136,0.012567146681249,-0.022017264738679,0.006945485249162,-0.002945763058960,-0.026704177260399,-0.002551779383793,-0.003838254837319,0.000160129769938,0.003627878613770,0.007882900536060,0.008317002095282) * MODEL4_texOff(vec2(0,1));
res += mat4x3(0.004830412566662,0.003577351337299,0.001171292038634,-0.006016894243658,-0.011923466809094,-0.009486624039710,-0.003264215542004,0.003265636041760,0.004976273514330,-0.002277783816680,0.000345545762684,0.000730204221327) * MODEL4_texOff(vec2(1,-1));
res += mat4x3(-0.005420320667326,-0.000777691428084,0.003057169960812,0.007530603092164,0.006986818742007,0.000927220389713,-0.010505135171115,-0.013638849370182,-0.010412232019007,0.000040159924538,0.001061487710103,-0.000389845634345) * MODEL4_texOff(vec2(1,0));
res += mat4x3(0.003336458932608,0.003826613770798,-0.003644299693406,0.002818776061758,0.001840864657424,0.003766989801079,0.000089499051683,-0.001981500536203,-0.007929450832307,-0.000644717831165,-0.002666047541425,-0.001914511434734) * MODEL4_texOff(vec2(1,1));
res += mat4x3(-0.018709111958742,-0.003092178376392,0.008962468244135,-0.001241738907993,0.003689830889925,0.002004842972383,0.002745364326984,-0.003777528181672,-0.002115441951901,-0.002822192618623,0.003334634238854,0.005059695802629) * MODEL5_texOff(vec2(-1,-1));
res += mat4x3(0.009384451434016,0.006446917541325,-0.007962606847286,-0.016306469216943,-0.028882618993521,-0.021061798557639,0.006837083026767,0.015826663002372,0.013191147707403,0.006343518383801,-0.000344007567037,-0.004831157624722) * MODEL5_texOff(vec2(-1,0));
res += mat4x3(-0.004959051962942,-0.004304477944970,0.003245727624744,0.011568661779165,0.015664961189032,0.002661830512807,0.000683286401909,-0.001440437510610,0.001995321363211,0.000354706717189,0.001241310266778,0.005320579744875) * MODEL5_texOff(vec2(-1,1));
res += mat4x3(-0.020507803186774,0.028408940881491,0.004215749911964,0.009847677312791,0.015891540795565,0.010348903015256,0.016868032515049,-0.003271655179560,-0.005521064624190,-0.019231166690588,0.006718978751451,0.014841380529106) * MODEL5_texOff(vec2(0,-1));
res += mat4x3(0.009580635465682,0.017044326290488,-0.018974401056767,-0.008953306823969,-0.019218983128667,-0.010825665667653,0.015533968806267,0.041022960096598,0.041830841451883,0.035514205694199,0.013587748631835,-0.013907225802541) * MODEL5_texOff(vec2(0,0));
res += mat4x3(-0.002479459391907,-0.002488135360181,-0.003643534146249,0.011637174524367,0.015011087059975,0.005566780455410,0.003529474372044,-0.000908856454771,-0.000195244138013,-0.015354807488620,-0.006806005723774,0.026286641135812) * MODEL5_texOff(vec2(0,1));
res += mat4x3(-0.000071704998845,0.001228878856637,0.001427505863830,-0.002738251583651,-0.004120586439967,-0.002923238556832,-0.010203841142356,-0.002657704055309,-0.001254548435099,-0.001347633660771,-0.004076858982444,-0.002902824198827) * MODEL5_texOff(vec2(1,-1));
res += mat4x3(-0.000547792005818,0.000372853566660,-0.000892659649253,-0.000247859046794,-0.001789087546058,-0.002834510989487,-0.010911309160292,-0.015991292893887,-0.014596779830754,-0.009747279807925,-0.008258434012532,-0.004459832794964) * MODEL5_texOff(vec2(1,0));
res += mat4x3(0.000343182473443,-0.000440417818027,-0.001099044457078,0.001884040422738,0.001884601078928,0.000255188118899,0.001551741617732,-0.000169511185959,-0.004380687139928,0.000204409981961,0.000718250754289,-0.001984749222174) * MODEL5_texOff(vec2(1,1));
res += mat4x3(0.006069850176573,0.002651675138623,-0.001522810780443,-0.000444963079644,0.003536180127412,-0.000335806544172,-0.001546445768327,-0.000324198423186,0.000510444981046,0.007738672196865,0.002380099380389,-0.002444763435051) * MODEL6_texOff(vec2(-1,-1));
res += mat4x3(-0.007731340359896,-0.002564175752923,0.006289746612310,0.016061866655946,0.004739874508232,-0.012285084463656,-0.012325245887041,-0.009686774574220,-0.007415100466460,-0.001466091373004,-0.011066210456192,-0.003434589598328) * MODEL6_texOff(vec2(-1,0));
res += mat4x3(0.002526318421587,-0.000480718270410,-0.006843962240964,-0.000180188842933,-0.007630263455212,-0.003070547478274,-0.002112985355780,-0.003963649272919,-0.008750531822443,-0.003254189388826,0.000498659850564,0.003424305003136) * MODEL6_texOff(vec2(-1,1));
res += mat4x3(-0.009520961903036,0.002101581543684,0.001311634317972,0.045178722590208,-0.003427494317293,-0.013826814480126,-0.010497958399355,0.002777816029266,0.006821016315371,-0.018533121794462,0.013457617722452,0.009391007013619) * MODEL6_texOff(vec2(0,-1));
res += mat4x3(-0.044544562697411,-0.050225831568241,-0.034008186310530,0.007253874093294,-0.042825017124414,0.007501307409257,0.040539134293795,0.021103151142597,-0.006713103037328,0.041409827768803,0.028648508712649,-0.037240475416183) * MODEL6_texOff(vec2(0,0));
res += mat4x3(0.002846336457878,-0.002692537615076,-0.018837591633201,-0.009148200973868,-0.004271246027201,0.020649598911405,-0.005283317994326,-0.001421509776264,0.020469984039664,0.012879214249551,-0.010934871621430,-0.027317006140947) * MODEL6_texOff(vec2(0,1));
res += mat4x3(-0.004603079985827,-0.002166757592931,-0.000009686160411,-0.003784093540162,-0.001233069924638,-0.001380792935379,0.007845877669752,0.003964397124946,0.003404493210837,-0.000011792875739,0.005660109221935,0.001080736285076) * MODEL6_texOff(vec2(1,-1));
res += mat4x3(0.007494331803173,0.000905810913537,-0.005778344813734,0.009976970963180,-0.003566834377125,-0.010672758333385,0.010295371524990,0.017364084720612,0.014985329471529,-0.000308347429382,-0.001962352544069,-0.003069564932957) * MODEL6_texOff(vec2(1,0));
res += mat4x3(-0.001982143381611,0.001594868022949,0.005716907791793,0.000519403431099,-0.001199575024657,0.004711422603577,-0.002434282563627,-0.003491637296975,0.003150126198307,-0.002222369192168,0.002899575280026,0.003328816732392) * MODEL6_texOff(vec2(1,1));
#endif

return vec4(res, 0);
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE SUBCONV2
//!DESC [AiUpscale_Fast_3x_Photo_RT] sub-pixel convolution 2

vec4 hook()
{

#if (SHARP == 0)
vec3 res = vec3(-0.000469781225547,-0.000603230495472,-0.001552609726787);
res += mat4x3(-0.000558437430300,-0.004534366540611,-0.002472075633705,0.002464444143698,-0.001050003338605,-0.001086152275093,0.012328118085861,0.006689955014735,0.001619223738089,-0.004259543959051,-0.001770756090991,0.000270114978775) * MODEL4_texOff(vec2(-1,-1));
res += mat4x3(-0.001247418229468,-0.002665267558768,0.004204610362649,-0.003339358139783,-0.004130293149501,0.000981515622698,0.010619970969856,0.006873032078147,0.010348150506616,-0.027533641085029,-0.024012643843889,-0.010112551972270) * MODEL4_texOff(vec2(-1,0));
res += mat4x3(-0.001432483317330,-0.001389479846694,0.002208919031546,0.003130842698738,0.002768396632746,-0.000757556059398,0.001559853320941,0.005628020036966,0.010677855461836,0.002029274823144,-0.000151275293319,-0.016329506412148) * MODEL4_texOff(vec2(-1,1));
res += mat4x3(0.010091548785567,0.004225463606417,0.001342418720014,0.012867862358689,-0.009959367103875,-0.014101174660027,-0.000555164995603,0.009029153734446,0.004665922373533,-0.021175956353545,-0.004143407102674,-0.000927944085561) * MODEL4_texOff(vec2(0,-1));
res += mat4x3(0.046310838311911,-0.036671865731478,-0.025644998997450,-0.045434169471264,0.011432684026659,0.040656305849552,-0.032626431435347,-0.051162064075470,-0.034216832369566,-0.022715995088220,-0.047818847000599,-0.046212796121836) * MODEL4_texOff(vec2(0,0));
res += mat4x3(-0.012877311557531,-0.025757323950529,0.034933056682348,0.013004869222641,0.019388277083635,-0.019459499046206,0.003384552663192,0.007848325185478,-0.002240315312520,-0.007555340416729,-0.007222493179142,-0.007003990001976) * MODEL4_texOff(vec2(0,1));
res += mat4x3(-0.001611653715372,0.001581100630574,0.004157531075180,-0.000459051952930,-0.000873175449669,-0.000352507719072,0.009539091028273,0.004043290391564,0.000342710496625,-0.004363777115941,-0.002768781967461,-0.003530429909006) * MODEL4_texOff(vec2(1,-1));
res += mat4x3(-0.001125806360506,-0.001132270321250,0.003176752012223,-0.000536692445166,-0.003141536377370,-0.001847321167588,0.009789433330297,0.005331586580724,0.007768461015075,0.000453580432804,-0.002083192579448,-0.004860479850322) * MODEL4_texOff(vec2(1,0));
res += mat4x3(0.006401258520782,-0.000128807325382,-0.003157070605084,0.000728635292035,-0.000390736531699,-0.000171893800143,-0.000306012923829,0.004769127815962,0.011218615807593,-0.000620037491899,0.002104335231707,0.000791358004790) * MODEL4_texOff(vec2(1,1));
res += mat4x3(0.002428827807307,-0.007788783870637,-0.005317696835846,0.000758286914788,0.002502679824829,-0.002119329757988,0.001524142804556,0.000161505566211,0.000629572081380,0.002482333453372,0.000465884309961,-0.000345489155734) * MODEL5_texOff(vec2(-1,-1));
res += mat4x3(0.000134359550430,-0.006252077408135,0.003253966569901,-0.007350041996688,0.002653134521097,0.002391424728557,0.005662326700985,-0.007392639759928,0.000096227755421,0.007183446548879,0.003955486696213,0.001838686759584) * MODEL5_texOff(vec2(-1,0));
res += mat4x3(0.000325482309563,0.001054244348779,0.005429377779365,-0.006586506497115,0.002853424986824,0.004593350924551,-0.002165865851566,-0.004702457692474,0.006821044255048,0.005165863316506,0.009875962510705,0.011360600590706) * MODEL5_texOff(vec2(-1,1));
res += mat4x3(-0.018668442964554,0.001018432201818,0.009952628053725,-0.031073182821274,0.010804634541273,0.010748598724604,0.002423101803288,-0.007646443322301,-0.001358762499876,0.007376031950116,0.010902638547122,0.006188127677888) * MODEL5_texOff(vec2(0,-1));
res += mat4x3(0.002906075911596,0.032328177243471,-0.001910308608785,0.004507138859481,0.046243946999311,-0.023635733872652,-0.029758496209979,-0.019945310428739,0.027435734868050,0.057029098272324,0.020696792751551,0.002320079365745) * MODEL5_texOff(vec2(0,0));
res += mat4x3(0.003517849836498,-0.002821731381118,-0.020092036575079,0.006888849660754,0.004178948234767,-0.027866154909134,-0.021964754909277,-0.001787203247659,0.039966408163309,-0.006966379005462,0.005756513681263,0.046974901109934) * MODEL5_texOff(vec2(0,1));
res += mat4x3(0.005697939544916,0.000374599942006,0.000727802223992,-0.004168273415416,-0.002466944511980,0.001359732355922,-0.001529293018393,0.000556987710297,0.000972306181211,0.004895011428744,-0.001131203607656,-0.001144641428255) * MODEL5_texOff(vec2(1,-1));
res += mat4x3(-0.000071520240454,-0.009307084605098,0.000486844743136,-0.006088568829000,0.001011973945424,0.003427126212046,0.002309527015314,0.007419472094625,-0.001802087062970,0.007439359091222,0.017689827829599,0.012432835064828) * MODEL5_texOff(vec2(1,0));
res += mat4x3(-0.009486763738096,-0.008279231376946,0.004364087246358,-0.004517978057265,0.002941080136225,0.005135633982718,-0.003360866336152,0.005956680513918,-0.000927695538849,0.005361354444176,0.005122681148350,0.002105148043483) * MODEL5_texOff(vec2(1,1));
res += mat4x3(-0.003687993856147,0.000550004770048,-0.000571080425289,-0.004942561499774,0.004627607762814,0.003219971433282,0.004530262202024,-0.000584561319556,-0.002499847440049,-0.002977934433147,-0.000492760213092,0.000579933228437) * MODEL6_texOff(vec2(-1,-1));
res += mat4x3(-0.005961921531707,-0.017196774482727,-0.016128253191710,0.002255678176880,0.005509246140718,-0.008462389931083,0.009957195259631,0.010389171540737,0.009970143437386,-0.009190263226628,-0.005383922252804,-0.004075237549841) * MODEL6_texOff(vec2(-1,0));
res += mat4x3(-0.002364261541516,0.000489802914672,0.002144498052076,-0.003517976496369,0.000005593341029,0.000979238422588,0.000405487575335,0.002345832297578,0.006544481497258,0.001310604740866,-0.002121737226844,-0.006202179938555) * MODEL6_texOff(vec2(-1,1));
res += mat4x3(0.018338276073337,0.008508972823620,0.001381329842843,-0.000506436859723,0.014181491918862,0.003659678623080,-0.014288550242782,-0.000112478679512,0.002292559016496,0.003866958897561,0.001002210658044,0.000853065983392) * MODEL6_texOff(vec2(0,-1));
res += mat4x3(-0.030586853623390,-0.012852648273110,0.017273895442486,0.042923614382744,-0.001162978936918,-0.037726014852524,0.012463998980820,-0.006911448668689,-0.021166745573282,0.014157945290208,0.024386217817664,0.014657419174910) * MODEL6_texOff(vec2(0,0));
res += mat4x3(0.006008180323988,0.001655473839492,-0.018352774903178,0.000441439682618,-0.016844755038619,-0.002128673484549,0.002126166829839,0.008386704139411,0.016711132600904,-0.000121457240311,-0.002590423217043,0.001774697448127) * MODEL6_texOff(vec2(0,1));
res += mat4x3(0.009843907319009,0.006859824527055,0.005324093159288,-0.001985145965591,0.000622630643193,0.000097453848866,-0.004381462465972,-0.001369808218442,0.000425367092248,0.004759636707604,-0.003594927722588,-0.004345242399722) * MODEL6_texOff(vec2(1,-1));
res += mat4x3(0.008478273637593,0.010329797863960,0.010024946182966,0.004725677892566,0.000194772117538,-0.004407634958625,-0.017336804419756,-0.024094654247165,-0.016768394038081,0.007871211506426,0.020200960338116,0.020395604893565) * MODEL6_texOff(vec2(1,0));
res += mat4x3(-0.002030801260844,-0.001921484246850,0.002815959276631,-0.000179652488441,-0.001291850698180,0.000230046513025,0.002160317730159,0.002694144845009,-0.004175936337560,-0.000597734819166,-0.004080392420292,-0.002939677331597) * MODEL6_texOff(vec2(1,1));
#elif (SHARP == 1)
vec3 res = vec3(0.000215156498598,-0.000255647406448,-0.001213504583575);
res += mat4x3(-0.009339883923531,0.000099695032986,0.000511675083544,0.011637539602816,0.004568859003484,0.002289603231475,-0.002339869737625,0.004238317254931,0.003848452353850,-0.004484573844820,-0.002241360023618,0.001757447374985) * MODEL4_texOff(vec2(-1,-1));
res += mat4x3(0.002374552190304,0.007127704564482,-0.006220200099051,-0.011686189100146,-0.004958722274750,0.009368112310767,-0.026677336543798,-0.031898941844702,-0.019891692325473,0.000136212358484,0.005382135510445,0.000177458365215) * MODEL4_texOff(vec2(-1,0));
res += mat4x3(-0.004526997450739,-0.001976543106139,-0.000778380548581,-0.001023114775307,-0.002029854804277,-0.008900801651180,0.007404857780784,0.004911531228572,-0.008994438685477,0.003734413767233,0.002163859549910,-0.003070882754400) * MODEL4_texOff(vec2(-1,1));
res += mat4x3(0.003830556292087,-0.014776135794818,-0.007352679502219,-0.005987410899252,-0.007337860297412,0.001172439893708,0.016904665157199,0.009967686608434,0.004560231231153,0.001313533284701,-0.027122421190143,0.001174421166070) * MODEL4_texOff(vec2(0,-1));
res += mat4x3(-0.049274533987045,-0.002626074478030,0.046068750321865,0.016286727041006,0.031734079122543,0.015703113749623,0.009554040618241,0.019389089196920,0.025280263274908,-0.036569118499756,-0.013270788826048,0.051139477640390) * MODEL4_texOff(vec2(0,0));
res += mat4x3(0.003710241289809,0.017400331795216,-0.000750267121475,-0.000618380552623,-0.004413690418005,0.001316459150985,0.001013078610413,-0.001642854418606,-0.003914420492947,0.006513026542962,0.011034200899303,-0.000414747919422) * MODEL4_texOff(vec2(0,1));
res += mat4x3(-0.004024936817586,0.003480337327346,0.000844486581627,-0.007200889755040,-0.009680091403425,-0.004424235783517,0.001779366866685,0.006484513636678,0.005994454491884,0.006079598795623,-0.000177932044608,-0.004821599926800) * MODEL4_texOff(vec2(1,-1));
res += mat4x3(-0.002489164238796,0.005290385801345,-0.003267443040386,0.003997480031103,-0.000719039584510,-0.003857082221657,-0.003637753659859,-0.005405138712376,-0.003636576235294,0.000772066996433,-0.006004826631397,0.001412805868313) * MODEL4_texOff(vec2(1,0));
res += mat4x3(0.000716712616850,0.004570399876684,-0.004781859926879,0.002406269544736,0.002793600084260,0.004701189696789,0.001668067649007,-0.000973594898824,-0.004587897099555,-0.000368017004803,-0.000863111228682,0.000589970324654) * MODEL4_texOff(vec2(1,1));
res += mat4x3(-0.004152189008892,-0.001073395600542,0.005201019346714,0.010605393908918,0.005198894534260,0.001409770455211,0.002014184370637,-0.002810433506966,-0.002314126119018,0.000347827852238,-0.000902151688933,-0.000584755209275) * MODEL5_texOff(vec2(-1,-1));
res += mat4x3(0.004824266303331,0.000516910222359,-0.002237569307908,0.005628062877804,0.002211974700913,0.007041870150715,0.002857461106032,0.008989255875349,0.008786946535110,-0.002635688520968,-0.004412143956870,-0.000216445798287) * MODEL5_texOff(vec2(-1,0));
res += mat4x3(-0.002831024117768,-0.003560478333384,0.000908623391297,0.009946390055120,0.015448423102498,0.011326584964991,0.000174163971678,-0.002149932784960,-0.000901235092897,0.004757755901664,0.005776837002486,0.002586529357359) * MODEL5_texOff(vec2(-1,1));
res += mat4x3(-0.037910137325525,0.032366611063480,0.018284682184458,0.000013441511328,0.013079829514027,0.010073613375425,-0.017314439639449,-0.004231606144458,-0.000083682927652,-0.022294666618109,0.007337657269090,0.014368548057973) * MODEL5_texOff(vec2(0,-1));
res += mat4x3(0.014094813726842,0.024367799982429,-0.024272825568914,-0.025705022737384,-0.041514735668898,-0.029791589826345,-0.028726594522595,-0.040833249688148,-0.036943294107914,0.033503543585539,0.010685888119042,-0.022187860682607) * MODEL5_texOff(vec2(0,0));
res += mat4x3(-0.004684897139668,-0.003851444693282,-0.001963929040357,0.012651104480028,0.016343612223864,0.000265784125077,0.002288274699822,-0.000824150920380,-0.009375033900142,-0.012475746683776,-0.007502992637455,0.020825533196330) * MODEL5_texOff(vec2(0,1));
res += mat4x3(-0.000933993724175,0.001477948972024,-0.002200472867116,0.002203867305070,0.000212147409911,-0.000679321179632,-0.014521312899888,0.000271377910394,0.004047621972859,-0.005641547963023,-0.003717023413628,0.000254963699263) * MODEL5_texOff(vec2(1,-1));
res += mat4x3(0.000647885084618,-0.000449204060715,-0.004623974207789,0.000366846128600,-0.001250264002010,-0.000324347463902,-0.019542155787349,-0.034399673342705,-0.030680829659104,-0.005248300731182,-0.008590186946094,-0.006727227009833) * MODEL5_texOff(vec2(1,0));
res += mat4x3(-0.000842458510306,-0.000436202884885,-0.000426795100793,0.003189085051417,0.005252985749394,0.002448426559567,0.002199526410550,0.003842217149213,-0.003331777872518,-0.002236533910036,-0.001646906486712,0.001628349418752) * MODEL5_texOff(vec2(1,1));
res += mat4x3(-0.001037131296471,0.002105610212311,0.001524145132862,0.007920626550913,0.002203263109550,-0.002164331031963,-0.002935630269349,-0.003896683221683,-0.000591609743424,-0.001768216257915,-0.002989739878103,-0.004031358286738) * MODEL6_texOff(vec2(-1,-1));
res += mat4x3(-0.012555832974613,-0.013951310887933,-0.007629488594830,-0.002298958599567,-0.003873404348269,0.002041719155386,0.016155108809471,0.017810061573982,0.005171725526452,-0.000301896710880,0.002536601154134,-0.002912256401032) * MODEL6_texOff(vec2(-1,0));
res += mat4x3(0.002283772686496,0.000741989992093,-0.006118318066001,0.000724313431419,-0.000358600256732,-0.001239798730239,-0.001214015646838,-0.000046088840463,0.006469613872468,-0.004060842096806,0.000065224819991,-0.002637081779540) * MODEL6_texOff(vec2(-1,1));
res += mat4x3(-0.008122486993670,-0.001141522778198,0.002554421313107,0.029338633641601,0.008478462696075,-0.007650897372514,0.013612417504191,0.002350802766159,-0.000757416652050,0.000034294542274,0.018817039206624,0.006488381884992) * MODEL6_texOff(vec2(0,-1));
res += mat4x3(0.019926875829697,0.009349721483886,-0.007022383157164,0.041051540523767,-0.034050423651934,-0.030025178566575,0.034453939646482,0.042987246066332,0.034795809537172,0.048907637596130,-0.002318030688912,-0.042277112603188) * MODEL6_texOff(vec2(0,0));
res += mat4x3(-0.003745138179511,0.000688969681505,0.013658332638443,-0.008526318706572,-0.013426915742457,0.021569378674030,-0.000181881594472,0.001772244926542,0.013663616031408,-0.000700183969457,-0.018494963645935,-0.003530285554007) * MODEL6_texOff(vec2(0,1));
res += mat4x3(0.007254914380610,-0.001449619070627,-0.002271432895213,0.000761245668400,-0.006243544165045,-0.001836595707573,0.004123688675463,0.000531782279722,-0.000888886163011,-0.001209911541082,0.006342677399516,0.000703394529410) * MODEL6_texOff(vec2(1,-1));
res += mat4x3(0.023335173726082,0.027897715568542,0.020421599969268,0.000016909812985,-0.002565314760432,0.003204278182238,-0.005436460021883,0.002720983466133,0.005464919377118,-0.008352673612535,0.004740032367408,-0.001421747147106) * MODEL6_texOff(vec2(1,0));
res += mat4x3(-0.000980586395599,0.001889736158773,0.009102866053581,0.002341436455026,-0.002506243065000,-0.000870356685482,0.001401407411322,-0.001334300264716,-0.003793076146394,0.002698834054172,0.007081385701895,-0.009880497120321) * MODEL6_texOff(vec2(1,1));
#endif

return vec4(res, 0);
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!COMPONENTS 4
//!BIND MODEL4
//!BIND MODEL5
//!BIND MODEL6
//!SAVE SUBCONV3
//!DESC [AiUpscale_Fast_3x_Photo_RT] sub-pixel convolution 3

vec4 hook()
{

#if (SHARP == 0)
vec3 res = vec3(0.001447892747819,0.001643646974117,0.000469968363177);
res += mat4x3(-0.001800374942832,-0.004413368646055,-0.002775589236990,-0.000170565195731,-0.000231326470384,0.000601629901212,0.005742316134274,0.001020718715154,-0.000747912738007,-0.011561220511794,-0.005655042827129,-0.001958044711500) * MODEL4_texOff(vec2(-1,-1));
res += mat4x3(0.003424792550504,-0.001742666470818,-0.000723412726074,0.000227313576033,-0.003600675379857,-0.001254612929188,0.007684633135796,0.004867435898632,0.006320309359580,-0.003226627130061,-0.013752305880189,-0.016948416829109) * MODEL4_texOff(vec2(-1,0));
res += mat4x3(-0.000088837434305,0.003545856336132,0.005871715489775,-0.000930719368625,-0.000499538145959,0.002859229687601,-0.000600613013376,0.001481922343373,0.006633099168539,-0.000762579089496,0.003396059619263,0.002406968036667) * MODEL4_texOff(vec2(-1,1));
res += mat4x3(0.022460687905550,-0.001610412728041,-0.001580334152095,0.010676826350391,-0.007658134214580,-0.012003949843347,0.006195254623890,0.010920513421297,0.004194029141217,-0.005901098717004,-0.000832739518955,0.003015049267560) * MODEL4_texOff(vec2(0,-1));
res += mat4x3(0.000223962866585,-0.039919849485159,0.011505438946187,-0.036506321281195,0.010226105339825,0.031114740297198,-0.027795087546110,-0.041503973305225,-0.022916957736015,0.052869755774736,0.037513110786676,0.004954164382070) * MODEL4_texOff(vec2(0,0));
res += mat4x3(-0.009832962416112,-0.006152941379696,0.026350725442171,0.013345624320209,0.017880594357848,-0.018892049789429,0.001548522501253,0.005494598764926,-0.002500585280359,0.000397599069402,0.007146006450057,0.030243793502450) * MODEL4_texOff(vec2(0,1));
res += mat4x3(-0.012816370464861,0.002116314833984,0.006051766220480,0.002787762554362,-0.006795673165470,-0.005565748549998,0.008112425915897,0.006981549318880,0.001954542705789,0.007964961230755,0.002836848143488,0.001535552088171) * MODEL4_texOff(vec2(1,-1));
res += mat4x3(0.027167400345206,0.012672007083893,-0.014442076906562,-0.013185189105570,-0.000122733501485,0.011902230791748,0.005704355891794,-0.004801313392818,-0.001339782145806,0.006738107185811,0.016134310513735,0.016098547726870) * MODEL4_texOff(vec2(1,0));
res += mat4x3(0.005785871762782,-0.017189707607031,-0.010457608848810,0.006609081290662,0.005892180837691,-0.006252026651055,0.004441335331649,0.012058204971254,0.015537514351308,0.003877392970026,0.006868252996355,0.006117403041571) * MODEL4_texOff(vec2(1,1));
res += mat4x3(-0.003004430094734,-0.009618461132050,-0.007697384338826,-0.003026261460036,0.001238964730874,-0.001355031155981,-0.002133046044037,0.000259548425674,0.002372766612098,0.001813690527342,-0.000364602485206,-0.001447683433071) * MODEL5_texOff(vec2(-1,-1));
res += mat4x3(0.006722104735672,0.003335655434057,-0.000601435836870,-0.007487487513572,0.012993619777262,0.004456709139049,-0.003138756146654,-0.003207896836102,-0.001948471530341,0.003103205235675,0.003602612065151,0.003325932659209) * MODEL5_texOff(vec2(-1,0));
res += mat4x3(0.001018493901938,0.001577814924531,0.005007689353079,-0.002667684806511,-0.002366148633882,-0.008834901265800,-0.002221605740488,0.000251157121966,-0.002838930813596,0.002539967419580,0.002038538921624,0.003406781703234) * MODEL5_texOff(vec2(-1,1));
res += mat4x3(0.009272322990000,0.002497328445315,0.004899912048131,-0.025805905461311,0.014729104936123,0.007687228731811,0.006660986226052,-0.004177330061793,-0.002060003578663,-0.002619031816721,-0.003233682364225,-0.000259849126451) * MODEL5_texOff(vec2(0,-1));
res += mat4x3(-0.037706062197685,0.011782830581069,0.033777385950089,0.035649556666613,0.011205224320292,-0.053759399801493,-0.001622521202080,-0.029251653701067,0.014807497151196,0.005928709171712,0.012459368444979,0.003755655372515) * MODEL5_texOff(vec2(0,0));
res += mat4x3(0.006204268429428,0.006009913515300,-0.021923385560513,-0.004270386416465,-0.005038622766733,0.006862021982670,-0.015978075563908,-0.010478067211807,0.051362965255976,-0.010851977393031,-0.031211797147989,-0.024386692792177) * MODEL5_texOff(vec2(0,1));
res += mat4x3(-0.008291651494801,0.005142753943801,0.004510878585279,0.003181017236784,0.001380922622047,-0.000114448950626,-0.000825862691272,-0.001184789813124,-0.001056130626239,0.005895088892430,-0.003372890409082,-0.006612525787205) * MODEL5_texOff(vec2(1,-1));
res += mat4x3(0.026980891823769,-0.017511971294880,-0.034400675445795,-0.034188833087683,0.005110193509609,0.021953426301479,-0.016442362219095,0.000270500313491,0.005335418041795,-0.038846623152494,-0.012916862033308,0.008165555074811) * MODEL5_texOff(vec2(1,0));
res += mat4x3(-0.003263601101935,-0.000796309439465,0.023614142090082,0.000345702399500,0.015802193433046,-0.004920185543597,-0.012944474816322,0.011424604803324,0.003837434109300,-0.002473305910826,-0.005015525501221,-0.027428261935711) * MODEL5_texOff(vec2(1,1));
res += mat4x3(0.001178916078061,0.000669609173201,0.001025171484798,0.000753999338485,0.003930700477213,0.002845420734957,-0.000748501275666,-0.002097476739436,-0.002362402155995,-0.000779518857598,0.003295077476650,0.002142174169421) * MODEL6_texOff(vec2(-1,-1));
res += mat4x3(-0.000434381421655,0.001193696749397,0.001948888180777,0.000480570161017,0.000479842274217,-0.001710006035864,0.008108712732792,0.005041601136327,0.002420426579192,-0.011844206601381,-0.011874609626830,-0.007184957154095) * MODEL6_texOff(vec2(-1,0));
res += mat4x3(0.002186304191127,0.002876731101424,0.000577663304284,-0.001497525023296,-0.000410798122175,0.003847245825455,-0.000029033428291,0.001643772469833,0.004990167915821,0.002382586477324,0.000371328846086,-0.005306077189744) * MODEL6_texOff(vec2(-1,1));
res += mat4x3(0.018334589898586,-0.000292353564873,-0.002566803479567,-0.013471287675202,0.011481782421470,0.004378234036267,-0.008684102445841,-0.002680955454707,-0.002208232413977,0.013947322033346,0.004270864650607,-0.000738607894164) * MODEL6_texOff(vec2(0,-1));
res += mat4x3(0.018942549824715,0.046880990266800,0.047814477235079,0.040193744003773,0.016574688255787,-0.038368176668882,-0.041387982666492,-0.036270901560783,-0.022933265194297,0.019610540941358,0.026485126465559,0.025564944371581) * MODEL6_texOff(vec2(0,0));
res += mat4x3(0.002268262207508,-0.001892874483019,0.001951381796971,0.000887411995791,-0.012464380823076,-0.009507752954960,0.001524880877696,-0.008101257495582,-0.024205518886447,0.000321456813253,0.005154730286449,0.011255988851190) * MODEL6_texOff(vec2(0,1));
res += mat4x3(-0.011721756309271,-0.004318275023252,0.003801411716267,0.002893802709877,0.004243099130690,0.001288837753236,0.010676801204681,0.000567524752114,-0.003411267185584,-0.012096806429327,-0.001641185255721,0.000091522051662) * MODEL6_texOff(vec2(1,-1));
res += mat4x3(0.031937483698130,0.016863347962499,-0.007580919656903,0.013442435301840,-0.006214001681656,-0.009544803760946,-0.019442623481154,-0.003050806233659,0.012242419645190,-0.034079905599356,-0.045067835599184,-0.032874334603548) * MODEL6_texOff(vec2(1,0));
res += mat4x3(-0.000198887166334,0.003071212675422,0.018961600959301,-0.002562006702647,-0.008577721193433,0.004640181083232,-0.002425557933748,-0.012798261828721,-0.020535117015243,0.001217461423948,-0.000615115684923,-0.011513750068843) * MODEL6_texOff(vec2(1,1));
#elif (SHARP == 1)
vec3 res = vec3(0.000720032141544,0.000326775189023,-0.000700069067534);
res += mat4x3(-0.001413077581674,-0.000084304709162,0.000049617890909,0.008603142574430,0.000164909521118,-0.000144834455568,0.000639136531390,0.001757310936227,0.000120279721159,0.000526314252056,-0.000407733430620,0.001622079522349) * MODEL4_texOff(vec2(-1,-1));
res += mat4x3(-0.008107986301184,0.006243311800063,0.006611018907279,0.005183178000152,0.011399589478970,0.012436139397323,-0.012059997767210,-0.014190847054124,-0.007313594687730,-0.001120257657021,-0.000830901612062,-0.000161053030752) * MODEL4_texOff(vec2(-1,0));
res += mat4x3(-0.004176943097264,-0.001390744699165,-0.005187413189560,-0.006785344798118,-0.006326427683234,-0.002349662594497,0.004332882817835,0.003167947288603,-0.005009090527892,0.001920791226439,0.000694012444001,-0.001607236103155) * MODEL4_texOff(vec2(-1,1));
res += mat4x3(0.012870244681835,-0.006650887429714,-0.008313674479723,-0.036070100963116,-0.004965353757143,0.009906912222505,0.017417542636395,0.014651959761977,0.007720080669969,-0.013887104578316,-0.019003987312317,0.005556364543736) * MODEL4_texOff(vec2(0,-1));
res += mat4x3(-0.018763329833746,-0.021979618817568,0.019752698019147,0.040877461433411,0.005125715862960,-0.042163435369730,-0.015190518461168,-0.007724135182798,0.007364659570158,-0.029058432206511,0.008196230977774,0.036592651158571) * MODEL4_texOff(vec2(0,0));
res += mat4x3(-0.004073820542544,0.012838373892009,0.021936617791653,-0.005929226521403,0.003691074438393,0.028698110952973,0.003661341732368,-0.001786981243640,-0.014183427207172,0.009948674589396,0.011129598133266,-0.009946821257472) * MODEL4_texOff(vec2(0,1));
res += mat4x3(-0.021477390080690,-0.002593719633296,0.002218966139480,0.013857951387763,0.003376795910299,0.002204715274274,0.000447184895165,0.000414963171352,0.001043111784384,0.018722936511040,-0.010318078100681,-0.010053397156298) * MODEL4_texOff(vec2(1,-1));
res += mat4x3(-0.010562374256551,0.025406181812286,0.004160665441304,-0.027882359921932,-0.016671523451805,0.009556352160871,0.015178717672825,0.015541022643447,0.007953519932926,-0.008396420627832,-0.021196451038122,0.017979733645916) * MODEL4_texOff(vec2(1,0));
res += mat4x3(0.005672220606357,0.008153490722179,-0.014362281188369,0.008156349882483,0.006824224255979,-0.009481894783676,-0.001547945081256,-0.002797152381390,0.000460393406684,0.001226941705681,0.003024465637282,0.007201621308923) * MODEL4_texOff(vec2(1,1));
res += mat4x3(0.000990669592284,0.003899097675458,0.003062809351832,0.010322559624910,0.002658768557012,-0.000420984928496,0.000414740236010,0.000798665103503,0.000809897202998,0.000155768153490,-0.001954240957275,-0.002188431331888) * MODEL5_texOff(vec2(-1,-1));
res += mat4x3(0.001992254983634,0.000799907895271,-0.000526627001818,0.009987496770918,0.011107205413282,0.013122369535267,0.002088400302455,0.003137785708532,0.002022901549935,-0.004672416485846,-0.005810423754156,-0.002006218535826) * MODEL5_texOff(vec2(-1,0));
res += mat4x3(0.000392705027480,-0.000377068354283,0.000451125932159,0.003717375453562,0.008425570093095,0.008958961814642,-0.000713556481060,-0.002377015771344,-0.000975931587163,0.004054082557559,0.003171733580530,-0.001894941902719) * MODEL5_texOff(vec2(-1,1));
res += mat4x3(-0.035356339067221,0.015093824826181,0.021554136648774,-0.007528760936111,0.005269597284496,0.004590103402734,-0.011770256794989,-0.001510608708486,0.003303311066702,-0.016995057463646,0.004462369251996,0.008661003783345) * MODEL5_texOff(vec2(0,-1));
res += mat4x3(0.013316182419658,0.017515799030662,-0.017827382311225,-0.032352995127439,-0.050165500491858,-0.038662228733301,-0.004565848503262,-0.013069468550384,-0.020409392192960,0.015494526363909,0.000280811218545,-0.021794565021992) * MODEL5_texOff(vec2(0,0));
res += mat4x3(-0.005842741113156,-0.004472651053220,0.002186730969697,0.011354724876583,0.015426276251674,-0.003242056351155,-0.002521562855691,-0.003667975543067,-0.000858416315168,-0.008052677847445,-0.008230853825808,0.006833760533482) * MODEL5_texOff(vec2(0,1));
res += mat4x3(-0.005683041643351,0.010522978380322,-0.005043911281973,0.010212089866400,0.009627239778638,0.004687334410846,0.019697055220604,0.003843150101602,0.002680160105228,-0.011125960387290,0.002104282379150,0.008178292773664) * MODEL5_texOff(vec2(1,-1));
res += mat4x3(0.004534582141787,0.006520559079945,-0.009338055737317,-0.001554033486173,-0.005554212722927,-0.000504541036207,0.024381829425693,0.045005574822426,0.041897177696228,0.014347745105624,0.002551165875047,-0.006879844702780) * MODEL5_texOff(vec2(1,0));
res += mat4x3(-0.000530797289684,0.000003405537882,-0.000441533746198,0.005621333140880,0.009335417300463,0.004898724611849,0.001767331385054,0.001232752343640,0.005703643895686,-0.012090800330043,-0.006729681510478,0.014668102376163) * MODEL5_texOff(vec2(1,1));
res += mat4x3(-0.003721293993294,-0.000285485526547,0.001060264417902,0.006254900712520,0.004069308284670,-0.001888342434540,-0.001255709445104,-0.003321608994156,-0.003616528585553,-0.002272661775351,-0.001876879134215,-0.002832622732967) * MODEL6_texOff(vec2(-1,-1));
res += mat4x3(-0.004793043248355,-0.008333411067724,-0.007816840894520,-0.001347245415673,-0.007280063349754,-0.001245826482773,0.006154108792543,0.005873288959265,0.003440166590735,0.007421243470162,0.004245694726706,-0.005528521724045) * MODEL6_texOff(vec2(-1,0));
res += mat4x3(0.001737972372212,0.001764561748132,-0.000968104985077,0.002179982373491,0.002985081868246,0.003281409619376,0.000172005282366,0.002520526759326,0.004715796094388,-0.003426439827308,-0.002231021411717,0.000548946787603) * MODEL6_texOff(vec2(-1,1));
res += mat4x3(0.009041870012879,0.000011316407836,-0.002816952299327,0.001388582051732,0.010443516075611,0.001700006774627,0.007302159443498,0.003888861974701,-0.003304527373984,0.015153929591179,0.013023114763200,0.000071290087362) * MODEL6_texOff(vec2(0,-1));
res += mat4x3(0.030323952436447,0.038243345916271,0.028785800561309,0.045408178120852,-0.006433976814151,-0.040785286575556,-0.044038202613592,-0.039864908903837,-0.010349186137319,0.021368550136685,-0.020328164100647,-0.018422571942210) * MODEL6_texOff(vec2(0,0));
res += mat4x3(0.001657945686020,0.002492888364941,0.012821524403989,-0.002258918248117,-0.015962552279234,0.007082880474627,0.003385610645637,-0.000021406292944,-0.019462222233415,-0.007348768878728,-0.008921989239752,0.011521886102855) * MODEL6_texOff(vec2(0,1));
res += mat4x3(0.011152061633766,0.000475725304568,-0.004354368895292,0.026406705379486,-0.011118896305561,-0.009266319684684,-0.021149531006813,-0.000119297044876,0.000883180298842,-0.013188953511417,0.007937630638480,0.005015254486352) * MODEL6_texOff(vec2(1,-1));
res += mat4x3(-0.016000550240278,0.002597304759547,0.016270156949759,-0.010206416249275,-0.022857172414660,0.019944177940488,-0.028186216950417,-0.050333667546511,-0.048340119421482,0.007015400100499,0.025829207152128,-0.013529322110116) * MODEL6_texOff(vec2(1,0));
res += mat4x3(0.006319318898022,-0.001755569246598,-0.013694442808628,-0.002881398657337,-0.002071463037282,0.005253367591649,-0.001828512293287,-0.003964571282268,-0.009582802653313,0.012974610552192,0.003346710931510,-0.028532642871141) * MODEL6_texOff(vec2(1,1));
#endif

return vec4(res, 0);
}

//!HOOK LUMA
//!WHEN OUTPUT.w LUMA.w 2.200 * > OUTPUT.h LUMA.h 2.200 * > *
//!WIDTH LUMA.w 3 *
//!HEIGHT LUMA.h 3 *
//!BIND SUBCONV1
//!BIND SUBCONV2
//!BIND SUBCONV3
//!BIND LANCZOS3
//!DESC [AiUpscale_Fast_3x_Photo_RT] depth to space

vec4 hook()
{
vec2 fcoord = fract(SUBCONV1_pos * SUBCONV1_size);
vec2 base = SUBCONV1_pos + (vec2(0.5) - fcoord) * SUBCONV1_pt;
ivec2 index = ivec2(fcoord * vec2(3));
mat3 res = mat3(SUBCONV1_tex(base).rgb,SUBCONV2_tex(base).rgb,SUBCONV3_tex(base).rgb);
return vec4(res[index.x][index.y] + float(LANCZOS3_texOff(0)), 0, 0, 1);
}
